Issue #1229 Changes for non-blocking TimeSelectorDialog.
Change-Id: I4826e62fe68fb128b8d146f6d386101adc758a37 Former-commit-id:624f6bfd01
[formerly624f6bfd01
[formerly fcca46a4698610dd8a3124ab7e23a3b88913cd6a]] Former-commit-id:53d6dde72f
Former-commit-id:b5ada2917e
This commit is contained in:
parent
52f7ff702d
commit
1dff491503
2 changed files with 26 additions and 5 deletions
|
@ -69,6 +69,7 @@ import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
|
||||||
import com.raytheon.viz.avnconfig.HelpUsageDlg;
|
import com.raytheon.viz.avnconfig.HelpUsageDlg;
|
||||||
import com.raytheon.viz.avnconfig.MessageStatusComp;
|
import com.raytheon.viz.avnconfig.MessageStatusComp;
|
||||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
|
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WeatherPlotDialog class displays the Weather Plot dialog for AvnFPS.
|
* WeatherPlotDialog class displays the Weather Plot dialog for AvnFPS.
|
||||||
|
@ -85,6 +86,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* as WeatherPlotDataManager.
|
* as WeatherPlotDataManager.
|
||||||
* 04/28/2011 8065 rferrel Use cache data.
|
* 04/28/2011 8065 rferrel Use cache data.
|
||||||
* 10/02/2012 1229 rferrel Made dialog non-blocking.
|
* 10/02/2012 1229 rferrel Made dialog non-blocking.
|
||||||
|
* 10/10/2012 1229 rferrel Changes for non-blocking TimeSelectorDlg.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -214,6 +216,8 @@ public class WeatherPlotDialog extends CaveSWTDialog {
|
||||||
*/
|
*/
|
||||||
private List<String> icaos;
|
private List<String> icaos;
|
||||||
|
|
||||||
|
private TimeSelectorDialog timeDlg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -411,10 +415,25 @@ public class WeatherPlotDialog extends CaveSWTDialog {
|
||||||
timesBtn.addSelectionListener(new SelectionAdapter() {
|
timesBtn.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
TimeSelectorDialog timeDlg = new TimeSelectorDialog(shell,
|
if (timeDlg == null || timeDlg.getShell() == null
|
||||||
wxPlotCfg);
|
|| timeDlg.isDisposed()) {
|
||||||
if ((Boolean) timeDlg.open()) {
|
timeDlg = new TimeSelectorDialog(shell, wxPlotCfg);
|
||||||
displayData();
|
timeDlg.setCloseCallback(new ICloseCallback() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
|
if (returnValue instanceof Boolean) {
|
||||||
|
boolean value = (Boolean) returnValue;
|
||||||
|
if (value) {
|
||||||
|
displayData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
timeDlg.open();
|
||||||
|
} else {
|
||||||
|
timeDlg.bringToTop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -49,6 +49,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 28 FEB 2008 938 lvenable Initial creation.
|
* 28 FEB 2008 938 lvenable Initial creation.
|
||||||
* 3/27/2008 1033 grichard Added ETA-MOS label.
|
* 3/27/2008 1033 grichard Added ETA-MOS label.
|
||||||
|
* 10/10/2012 1229 rferrel Make dialog non-blocking.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -95,7 +96,8 @@ public class TimeSelectorDialog extends CaveSWTDialog {
|
||||||
*/
|
*/
|
||||||
public TimeSelectorDialog(Shell parent, WxPlotCfg wxPlotCfg) {
|
public TimeSelectorDialog(Shell parent, WxPlotCfg wxPlotCfg) {
|
||||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
||||||
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.MODE_INDEPENDENT);
|
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.MODE_INDEPENDENT
|
||||||
|
| CAVE.DO_NOT_BLOCK);
|
||||||
setText("AvnFPS Time Selector");
|
setText("AvnFPS Time Selector");
|
||||||
this.wxPlotCfg = wxPlotCfg;
|
this.wxPlotCfg = wxPlotCfg;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue