Issue #1229 Changes for non-blocking ClimateDataMenuDlg.

Change-Id: I4995c135140b89aa040a29266ff04840ed172084

Former-commit-id: 238961a288d30d70b2661a7441852ca5df3d41b9
This commit is contained in:
Roger Ferrel 2012-10-04 11:49:29 -05:00
parent 37d8f23073
commit 2b23f4a4ac
2 changed files with 11 additions and 6 deletions

View file

@ -54,6 +54,7 @@ import com.raytheon.viz.avnconfig.TextEditorSetupDlg;
* ------------ ---------- ----------- --------------------------
* 22 MAY 2008 1119 lvenable Initial creation
* 01 OCT 2010 4345 rferrel Bring existing dialog to the front.
* 04 OCT 2012 1229 rferrel Work with non-blocking ClimateDataMenuDlg.
*
* </pre>
*
@ -366,10 +367,12 @@ public class AvnconfigDlg extends Dialog {
climateBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
if (climateDataDlg == null) {
if (climateDataDlg == null || climateDataDlg.getShell() == null
|| climateDataDlg.isDisposed()) {
climateDataDlg = new ClimateDataMenuDlg(shell);
climateDataDlg.open();
climateDataDlg = null;
} else {
climateDataDlg.bringToTop();
}
}
});

View file

@ -91,6 +91,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Mar 18, 2011 #8681 rferrel Corrected checkSite to prevent exception.
* May 24, 2011 #9075 rferrel Changed getObsHistoryFromInv() to scan
* ish-inventory.txt only one time.
* Oct 04, 2012 #1229 rferrel Made non-blocking.
*
* </pre>
*
@ -229,7 +230,8 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
* Parent shell.
*/
public ClimateDataMenuDlg(Shell parentShell) {
super(parentShell, SWT.DIALOG_TRIM, CAVE.PERSPECTIVE_INDEPENDENT);
super(parentShell, SWT.DIALOG_TRIM, CAVE.PERSPECTIVE_INDEPENDENT
| CAVE.DO_NOT_BLOCK);
setText("AvnFPS Climate Data Menu");
}
@ -881,11 +883,11 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
identList.add(siteList.get(i));
}
} catch (IOException e) {
statusHandler.handle(Priority.PROBLEM, e.getMessage());
statusHandler.handle(Priority.PROBLEM, e.getMessage());
} catch (ConfigurationException e) {
statusHandler.handle(Priority.PROBLEM, e.toString());
statusHandler.handle(Priority.PROBLEM, e.toString());
} catch (LocalizationOpFailedException e) {
statusHandler.handle(Priority.PROBLEM, e.getMessage());
statusHandler.handle(Priority.PROBLEM, e.getMessage());
}
}