Issue #1229 Changes for non-blocking ClimateDataMenuDlg.

Change-Id: I4995c135140b89aa040a29266ff04840ed172084

Former-commit-id: 8f3205ab4f [formerly bb552bcaf6] [formerly 2b23f4a4ac] [formerly e83e6e4348 [formerly 2b23f4a4ac [formerly 238961a288d30d70b2661a7441852ca5df3d41b9]]]
Former-commit-id: e83e6e4348
Former-commit-id: db06b9bca5f6d21045f86efc9230751c9e63b0d3 [formerly 6b7d9fa73f]
Former-commit-id: f9513e50f9
This commit is contained in:
Roger Ferrel 2012-10-04 11:49:29 -05:00
parent 3721d18b43
commit 60513f0c99
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 * 22 MAY 2008 1119 lvenable Initial creation
* 01 OCT 2010 4345 rferrel Bring existing dialog to the front. * 01 OCT 2010 4345 rferrel Bring existing dialog to the front.
* 04 OCT 2012 1229 rferrel Work with non-blocking ClimateDataMenuDlg.
* *
* </pre> * </pre>
* *
@ -366,10 +367,12 @@ public class AvnconfigDlg extends Dialog {
climateBtn.addSelectionListener(new SelectionAdapter() { climateBtn.addSelectionListener(new SelectionAdapter() {
@Override @Override
public void widgetSelected(SelectionEvent event) { public void widgetSelected(SelectionEvent event) {
if (climateDataDlg == null) { if (climateDataDlg == null || climateDataDlg.getShell() == null
|| climateDataDlg.isDisposed()) {
climateDataDlg = new ClimateDataMenuDlg(shell); climateDataDlg = new ClimateDataMenuDlg(shell);
climateDataDlg.open(); 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. * Mar 18, 2011 #8681 rferrel Corrected checkSite to prevent exception.
* May 24, 2011 #9075 rferrel Changed getObsHistoryFromInv() to scan * May 24, 2011 #9075 rferrel Changed getObsHistoryFromInv() to scan
* ish-inventory.txt only one time. * ish-inventory.txt only one time.
* Oct 04, 2012 #1229 rferrel Made non-blocking.
* *
* </pre> * </pre>
* *
@ -229,7 +230,8 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
* Parent shell. * Parent shell.
*/ */
public ClimateDataMenuDlg(Shell parentShell) { 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"); setText("AvnFPS Climate Data Menu");
} }
@ -881,11 +883,11 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
identList.add(siteList.get(i)); identList.add(siteList.get(i));
} }
} catch (IOException e) { } catch (IOException e) {
statusHandler.handle(Priority.PROBLEM, e.getMessage()); statusHandler.handle(Priority.PROBLEM, e.getMessage());
} catch (ConfigurationException e) { } catch (ConfigurationException e) {
statusHandler.handle(Priority.PROBLEM, e.toString()); statusHandler.handle(Priority.PROBLEM, e.toString());
} catch (LocalizationOpFailedException e) { } catch (LocalizationOpFailedException e) {
statusHandler.handle(Priority.PROBLEM, e.getMessage()); statusHandler.handle(Priority.PROBLEM, e.getMessage());
} }
} }