Merge "Issue #1298 Changes for non-blocking WeatherElementBrowserDialog." into development

Former-commit-id: 4bb79b9b66 [formerly 3c6facf14b] [formerly a7eb12fd9e] [formerly 676856f62f [formerly a7eb12fd9e [formerly d6040334d8c3ea717966b54dc6bcc333d67d5b1b]]]
Former-commit-id: 676856f62f
Former-commit-id: 5ef83c8401a814312c342b360ca5b70b8ab757a3 [formerly b491922ddc]
Former-commit-id: 1a475c55de
This commit is contained in:
Lee Venable 2012-10-30 10:26:53 -05:00 committed by Gerrit Code Review
commit 429f3732f6
2 changed files with 14 additions and 6 deletions

View file

@ -38,6 +38,7 @@ import com.raytheon.viz.gfe.dialogs.WeatherElementBrowserDialog;
* 02/22/2008 Eric Babin Initial Creation
* 04/09/2009 1288 rjpeter Removed explicit refresh of SpatialDisplayManager.
* 04/30/2009 2282 rjpeter Moved dialog handling to the dialog.
* 10/30/2012 1229 rferrel Changed for non-blocking WeatherElementBrowserDialog.
* </pre>
*
* @author ebabin
@ -45,6 +46,7 @@ import com.raytheon.viz.gfe.dialogs.WeatherElementBrowserDialog;
*/
public class ShowWeatherElementBrowserDialog extends AbstractHandler {
private WeatherElementBrowserDialog dialog;
/*
* (non-Javadoc)
@ -56,13 +58,18 @@ public class ShowWeatherElementBrowserDialog extends AbstractHandler {
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
DataManager dm = DataManager.getCurrentInstance();
if (dm != null) {
if (dm == null) {
return null;
}
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
WeatherElementBrowserDialog dialog = new WeatherElementBrowserDialog(
shell, dm);
dialog.setBlockOnOpen(true);
dialog = new WeatherElementBrowserDialog(shell, dm);
dialog.setBlockOnOpen(false);
dialog.open();
} else {
dialog.bringToTop();
}
return null;

View file

@ -72,6 +72,7 @@ import com.raytheon.viz.ui.widgets.ToggleSelectList;
* 09/12/2012 #1117 dgilling Revert previous changes, retrieve
* database list from ParmManager
* not EDEX.
* 10/30/2012 1298 rferrel Code clean up non-blocking dialog.
* </pre>
*
* @author ebabin
@ -109,9 +110,9 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
private ParmID[] currentDisplayedParms;
private static final Point size = new Point(603, 778);
private final Point size = new Point(603, 778);
private static final String IFP = "IFP";
private final String IFP = "IFP";
/**
* Constructor