Issue #2757 - Updated handlers for dialog buttons.
Former-commit-id: 69a82633c287bf18c9f436014bb552829dcb62ea
This commit is contained in:
parent
07a7645fcd
commit
71c4d8db07
8 changed files with 108 additions and 50 deletions
|
@ -38,6 +38,7 @@ import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
|
||||||
* Dec 19 2009 3963 dhladky Initial creation.
|
* Dec 19 2009 3963 dhladky Initial creation.
|
||||||
* Jul 14 2010 6567 zhao Launch AreaConfigDlg w/o monitor
|
* Jul 14 2010 6567 zhao Launch AreaConfigDlg w/o monitor
|
||||||
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog.
|
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog.
|
||||||
|
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -51,7 +52,7 @@ public class FogAreaConfigAction extends AbstractHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
if (areaDialog == null) {
|
if (areaDialog == null || areaDialog.isDisposed()) {
|
||||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||||
.getShell();
|
.getShell();
|
||||||
areaDialog = new FogMonitoringAreaConfigDlg(shell,
|
areaDialog = new FogMonitoringAreaConfigDlg(shell,
|
||||||
|
|
|
@ -29,6 +29,7 @@ import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||||
import com.raytheon.uf.viz.monitor.fog.FogMonitor;
|
import com.raytheon.uf.viz.monitor.fog.FogMonitor;
|
||||||
import com.raytheon.uf.viz.monitor.fog.threshold.FogThresholdMgr;
|
import com.raytheon.uf.viz.monitor.fog.threshold.FogThresholdMgr;
|
||||||
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
|
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fog Monitor area configuration dialog.
|
* Fog Monitor area configuration dialog.
|
||||||
|
@ -42,7 +43,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
* Nov 27, 2012 1351 skorolev Changes for non-blocking dialog.
|
* Nov 27, 2012 1351 skorolev Changes for non-blocking dialog.
|
||||||
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
||||||
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
||||||
* Sep 15, 2014 2757 skorolev Removed extra dialog.
|
* Sep 19, 2014 2757 skorolev Updated handlers for dialog buttons.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -51,6 +52,15 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
|
|
||||||
|
private FogMonDispThreshDlg fogMonitorDlg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param parent
|
||||||
|
* @param title
|
||||||
|
*/
|
||||||
public FogMonitoringAreaConfigDlg(Shell parent, String title) {
|
public FogMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||||
super(parent, title, AppName.FOG);
|
super(parent, title, AppName.FOG);
|
||||||
readConfigData();
|
readConfigData();
|
||||||
|
@ -67,7 +77,6 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void handleOkBtnSelection() {
|
protected void handleOkBtnSelection() {
|
||||||
// Check for changes in the data
|
|
||||||
if (dataIsChanged()) {
|
if (dataIsChanged()) {
|
||||||
int choice = showMessage(shell, SWT.OK | SWT.CANCEL,
|
int choice = showMessage(shell, SWT.OK | SWT.CANCEL,
|
||||||
"Fog Monitor Confirm Changes",
|
"Fog Monitor Confirm Changes",
|
||||||
|
@ -85,20 +94,30 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
*/
|
*/
|
||||||
FogThresholdMgr.reInitialize();
|
FogThresholdMgr.reInitialize();
|
||||||
FogMonitor.reInitialize();
|
FogMonitor.reInitialize();
|
||||||
|
|
||||||
if ((!configManager.getAddedZones().isEmpty())
|
if ((!configManager.getAddedZones().isEmpty())
|
||||||
|| (!configManager.getAddedStations().isEmpty())) {
|
|| (!configManager.getAddedStations().isEmpty())) {
|
||||||
if (editDialog() == SWT.YES) {
|
if (editDialog() == SWT.YES) {
|
||||||
FogMonDispThreshDlg fogMonitorDlg = new FogMonDispThreshDlg(
|
fogMonitorDlg = new FogMonDispThreshDlg(shell,
|
||||||
shell, CommonConfig.AppName.FOG,
|
CommonConfig.AppName.FOG, DataUsageKey.MONITOR);
|
||||||
DataUsageKey.MONITOR);
|
fogMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
|
// Clear added zones and stations.
|
||||||
|
configManager.getAddedZones().clear();
|
||||||
|
configManager.getAddedStations().clear();
|
||||||
|
setReturnValue(true);
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
});
|
||||||
fogMonitorDlg.open();
|
fogMonitorDlg.open();
|
||||||
}
|
}
|
||||||
configManager.getAddedZones().clear();
|
|
||||||
configManager.getAddedStations().clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (fogMonitorDlg == null || fogMonitorDlg.isDisposed()) {
|
||||||
|
setReturnValue(true);
|
||||||
|
close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -38,6 +38,7 @@ import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSMonitoringAreaConfigDlg
|
||||||
* Dec 28, 2009 3963 dhladky Initial creation.
|
* Dec 28, 2009 3963 dhladky Initial creation.
|
||||||
* March 5, 2012 14413 zhao Launch AreaConfigDlg w/o monitor
|
* March 5, 2012 14413 zhao Launch AreaConfigDlg w/o monitor
|
||||||
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog
|
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog
|
||||||
|
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -51,7 +52,7 @@ public class SafeseasAreaConfigAction extends AbstractHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
if (configDlg == null) {
|
if (configDlg == null || configDlg.isDisposed()) {
|
||||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||||
.getShell();
|
.getShell();
|
||||||
configDlg = new SSMonitoringAreaConfigDlg(shell,
|
configDlg = new SSMonitoringAreaConfigDlg(shell,
|
||||||
|
|
|
@ -37,6 +37,22 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.SafeSeasMonitor;
|
||||||
import com.raytheon.uf.viz.monitor.xml.AreaXML;
|
import com.raytheon.uf.viz.monitor.xml.AreaXML;
|
||||||
import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SAFESEAS Monitor Meteo Table.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* Sep 17, 2014 2757 skorolev Removed unnecessary printouts.
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author skorolev
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class SSMonitorMeteoTab extends TabItemComp implements IUpdateMonitorMeteo
|
public class SSMonitorMeteoTab extends TabItemComp implements IUpdateMonitorMeteo
|
||||||
{
|
{
|
||||||
private SSMonitorMeteoEditDlg monitorMeteoEditDlg;
|
private SSMonitorMeteoEditDlg monitorMeteoEditDlg;
|
||||||
|
@ -191,9 +207,6 @@ public class SSMonitorMeteoTab extends TabItemComp implements IUpdateMonitorMete
|
||||||
ssmmd.setWindSpeedR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
ssmmd.setWindSpeedR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||||
ssmmd.setWindSpeedY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
ssmmd.setWindSpeedY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||||
|
|
||||||
System.out.println("=== " + sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
|
||||||
System.out.println("=== " + sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Peak Wind
|
* Peak Wind
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -29,6 +29,7 @@ import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||||
import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
|
import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
|
||||||
import com.raytheon.uf.viz.monitor.safeseas.threshold.SSThresholdMgr;
|
import com.raytheon.uf.viz.monitor.safeseas.threshold.SSThresholdMgr;
|
||||||
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
|
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SAFESEAS area configuration dialog.
|
* SAFESEAS area configuration dialog.
|
||||||
|
@ -42,7 +43,8 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
* Nov 27, 2012 1351 skorolev Changes for non-blocking dialog.
|
* Nov 27, 2012 1351 skorolev Changes for non-blocking dialog.
|
||||||
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
||||||
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
||||||
* Sep 15, 2014 2757 skorolev Removed extra dialog.
|
* Sep 19, 2014 2757 skorolev Updated handlers for dialog buttons.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -52,6 +54,8 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
|
|
||||||
public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
|
|
||||||
|
private SSDispMonThreshDlg ssMonitorDlg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
|
@ -66,15 +70,8 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
private SSMonitorConfigurationManager configManager = SSMonitorConfigurationManager
|
private SSMonitorConfigurationManager configManager = SSMonitorConfigurationManager
|
||||||
.getInstance();
|
.getInstance();
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg#
|
|
||||||
* handleOkBtnSelection()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void handleOkBtnSelection() {
|
protected void handleOkBtnSelection() {
|
||||||
// Check for changes in the data
|
|
||||||
if (dataIsChanged()) {
|
if (dataIsChanged()) {
|
||||||
int choice = showMessage(shell, SWT.OK | SWT.CANCEL,
|
int choice = showMessage(shell, SWT.OK | SWT.CANCEL,
|
||||||
"SAFESEAS Monitor Confirm Changes",
|
"SAFESEAS Monitor Confirm Changes",
|
||||||
|
@ -95,16 +92,28 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
if ((!configManager.getAddedZones().isEmpty())
|
if ((!configManager.getAddedZones().isEmpty())
|
||||||
|| (!configManager.getAddedStations().isEmpty())) {
|
|| (!configManager.getAddedStations().isEmpty())) {
|
||||||
if (editDialog() == SWT.YES) {
|
if (editDialog() == SWT.YES) {
|
||||||
SSDispMonThreshDlg ssMonitorDlg = new SSDispMonThreshDlg(
|
ssMonitorDlg = new SSDispMonThreshDlg(shell,
|
||||||
shell, CommonConfig.AppName.SAFESEAS,
|
CommonConfig.AppName.SAFESEAS,
|
||||||
DataUsageKey.MONITOR);
|
DataUsageKey.MONITOR);
|
||||||
|
ssMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
|
// Clear added zones and stations.
|
||||||
|
configManager.getAddedZones().clear();
|
||||||
|
configManager.getAddedStations().clear();
|
||||||
|
setReturnValue(true);
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
});
|
||||||
ssMonitorDlg.open();
|
ssMonitorDlg.open();
|
||||||
}
|
}
|
||||||
configManager.getAddedZones().clear();
|
|
||||||
configManager.getAddedStations().clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ssMonitorDlg == null || ssMonitorDlg.isDisposed()) {
|
||||||
|
setReturnValue(true);
|
||||||
|
close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -38,6 +38,7 @@ import com.raytheon.uf.viz.monitor.snow.ui.dialogs.SnowMonitoringAreaConfigDlg;
|
||||||
* Dec 28, 2009 3963 dhladky Initial creation.
|
* Dec 28, 2009 3963 dhladky Initial creation.
|
||||||
* March 5, 2012 14413 zhao Launch AreaConfigDlg w/o monitor
|
* March 5, 2012 14413 zhao Launch AreaConfigDlg w/o monitor
|
||||||
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog
|
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog
|
||||||
|
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -51,7 +52,7 @@ public class SnowAreaConfigAction extends AbstractHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
if (configDlg == null) {
|
if (configDlg == null || configDlg.isDisposed()) {
|
||||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||||
.getShell();
|
.getShell();
|
||||||
configDlg = new SnowMonitoringAreaConfigDlg(shell,
|
configDlg = new SnowMonitoringAreaConfigDlg(shell,
|
||||||
|
|
|
@ -29,6 +29,7 @@ import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||||
import com.raytheon.uf.viz.monitor.snow.SnowMonitor;
|
import com.raytheon.uf.viz.monitor.snow.SnowMonitor;
|
||||||
import com.raytheon.uf.viz.monitor.snow.threshold.SnowThresholdMgr;
|
import com.raytheon.uf.viz.monitor.snow.threshold.SnowThresholdMgr;
|
||||||
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
|
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SNOW Monitor area configuration dialog.
|
* SNOW Monitor area configuration dialog.
|
||||||
|
@ -42,7 +43,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
* Nov 27, 2012 1351 skorolev Changes for non-blocking dialog.
|
* Nov 27, 2012 1351 skorolev Changes for non-blocking dialog.
|
||||||
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
||||||
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
||||||
* Sep 15, 2014 2757 skorolev Removed extra dialog.
|
* Sep 19, 2014 2757 skorolev Updated handlers for dialog buttons.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -52,6 +53,14 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||||
|
|
||||||
public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
|
|
||||||
|
private SnowMonDispThreshDlg snowMonitorDlg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param parent
|
||||||
|
* @param title
|
||||||
|
*/
|
||||||
public SnowMonitoringAreaConfigDlg(Shell parent, String title) {
|
public SnowMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||||
super(parent, title, AppName.SNOW);
|
super(parent, title, AppName.SNOW);
|
||||||
readConfigData();
|
readConfigData();
|
||||||
|
@ -64,11 +73,10 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg#
|
* @see com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg#
|
||||||
* handleOkBtnSelection()
|
* handleApplyBtnSelection()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void handleOkBtnSelection() {
|
protected void handleOkBtnSelection() {
|
||||||
// Check for changes in the data
|
|
||||||
if (dataIsChanged()) {
|
if (dataIsChanged()) {
|
||||||
int choice = showMessage(shell, SWT.OK | SWT.CANCEL,
|
int choice = showMessage(shell, SWT.OK | SWT.CANCEL,
|
||||||
"SNOW Monitor Confirm Changes",
|
"SNOW Monitor Confirm Changes",
|
||||||
|
@ -84,20 +92,30 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
*/
|
*/
|
||||||
SnowThresholdMgr.reInitialize();
|
SnowThresholdMgr.reInitialize();
|
||||||
SnowMonitor.reInitialize();
|
SnowMonitor.reInitialize();
|
||||||
|
|
||||||
if ((!configManager.getAddedZones().isEmpty())
|
if ((!configManager.getAddedZones().isEmpty())
|
||||||
|| (!configManager.getAddedStations().isEmpty())) {
|
|| (!configManager.getAddedStations().isEmpty())) {
|
||||||
if (editDialog() == SWT.YES) {
|
if (editDialog() == SWT.YES) {
|
||||||
SnowMonDispThreshDlg snowMonitorDlg = new SnowMonDispThreshDlg(
|
snowMonitorDlg = new SnowMonDispThreshDlg(shell,
|
||||||
shell, CommonConfig.AppName.SNOW,
|
CommonConfig.AppName.SNOW, DataUsageKey.MONITOR);
|
||||||
DataUsageKey.MONITOR);
|
snowMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
|
// Clear added zones and stations.
|
||||||
|
configManager.getAddedZones().clear();
|
||||||
|
configManager.getAddedStations().clear();
|
||||||
|
setReturnValue(true);
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
});
|
||||||
snowMonitorDlg.open();
|
snowMonitorDlg.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
configManager.getAddedZones().clear();
|
|
||||||
configManager.getAddedStations().clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (snowMonitorDlg == null || snowMonitorDlg.isDisposed()) {
|
||||||
|
setReturnValue(true);
|
||||||
|
close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -135,5 +153,4 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||||
timeWindow.setSelection(configManager.getTimeWindow());
|
timeWindow.setSelection(configManager.getTimeWindow());
|
||||||
setTimeScaleLabel();
|
setTimeScaleLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* Oct 07, 2013 #2443 lvenable Fixed image memory leak.
|
* Oct 07, 2013 #2443 lvenable Fixed image memory leak.
|
||||||
* Jan 29, 2014 2757 skorolev Added status variables.
|
* Jan 29, 2014 2757 skorolev Added status variables.
|
||||||
* Apr 23, 2014 3054 skorolev Fixed issue with removing from list a new zone and a new station.
|
* Apr 23, 2014 3054 skorolev Fixed issue with removing from list a new zone and a new station.
|
||||||
|
* Sep 16, 2014 2757 skorolev Updated createBottomButtons method.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
|
@ -1284,18 +1285,12 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the cancel or "X" button is clicked.
|
* Called when the cancel.
|
||||||
*/
|
*/
|
||||||
private void closeWithoutSave() {
|
private void closeWithoutSave() {
|
||||||
int choice = showMessage(shell, SWT.YES | SWT.NO, appName
|
resetStatus();
|
||||||
+ " Monitor Exit", "Are you sure you want to exit?");
|
setReturnValue(true);
|
||||||
if (choice == SWT.YES) {
|
close();
|
||||||
MonitorConfigurationManager configManager = getConfigManager();
|
|
||||||
configManager.setAddedZones(new ArrayList<String>());
|
|
||||||
configManager.setAddedStations(new ArrayList<String>());
|
|
||||||
setReturnValue(true);
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1304,7 +1299,8 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
||||||
protected abstract void setAlgorithmText();
|
protected abstract void setAlgorithmText();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles OK button.
|
* Handles OK button. Save changes and close the dialog (or just close if
|
||||||
|
* there are no changes).
|
||||||
*/
|
*/
|
||||||
protected abstract void handleOkBtnSelection();
|
protected abstract void handleOkBtnSelection();
|
||||||
|
|
||||||
|
@ -1466,4 +1462,5 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
||||||
"Edit Thresholds Now?", message2);
|
"Edit Thresholds Now?", message2);
|
||||||
return yesno;
|
return yesno;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue