diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/CigVisTrendAction.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/CigVisTrendAction.java deleted file mode 100644 index c051756c50..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/CigVisTrendAction.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation; - -import java.io.FileNotFoundException; -import java.util.List; - -import org.apache.commons.configuration.ConfigurationException; -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; - -import com.raytheon.uf.common.status.IUFStatusHandler; -import com.raytheon.uf.common.status.UFStatus; -import com.raytheon.uf.common.status.UFStatus.Priority; -import com.raytheon.viz.aviation.climatology.CigVisTrendDlg; -import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType; -import com.raytheon.viz.avnconfig.TafSiteConfigFactory; - -/** - * Action class for launching the Ceiling/Visibility Trend dialog. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 23, 2010            mnash     Initial creation
- * 
- * 
- * - * @author mnash - * @version 1.0 - */ -@Deprecated -// TODO no longer used remove from the base line -public class CigVisTrendAction extends AbstractHandler { - private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(CigVisTrendAction.class); - - private CigVisTrendDlg cigVisTrendDialog; - - private List siteList; - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. - * ExecutionEvent) - */ - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - try { - if (siteList == null) { - siteList = TafSiteConfigFactory.getInstance().getSiteList(); - } - } catch (ConfigurationException e) { - statusHandler.handle(Priority.PROBLEM, "Configuration error", e); - return null; - } catch (FileNotFoundException e) { - statusHandler.handle(Priority.PROBLEM, - "Missing configuration file", e); - return null; - } - - Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (cigVisTrendDialog == null - || cigVisTrendDialog.getShell().isDisposed()) { - cigVisTrendDialog = new CigVisTrendDlg(shell, siteList, - StatusMessageType.Metar, null); - cigVisTrendDialog.open(); - cigVisTrendDialog = null; - } else { - cigVisTrendDialog.getShell().setVisible(true); - cigVisTrendDialog.getShell().setFocus(); - } - - return null; - } -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatedata/ClimateDataMenuDlg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatedata/ClimateDataMenuDlg.java index 1ccaa0a923..dcbed87be9 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatedata/ClimateDataMenuDlg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatedata/ClimateDataMenuDlg.java @@ -99,6 +99,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * Oct 08, 2012 #1229 rferrel Changes for non-blocking CigVisDistributionDlg. * Oct 08, 2012 #1229 rferrel Changes for non-blocking WindRosePlotDlg. * Oct 09, 2012 #1229 rferrel Changes for non-blocking MetarDisplayDialog. + * Oct 09, 2012 #1229 rferrel Changes for non-blocking CigVisTrendDlg. * * * @@ -448,11 +449,13 @@ public class ClimateDataMenuDlg extends CaveSWTDialog { cigVisTrendMI.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - if (cigVisTrend == null) { + if (cigVisTrend == null || cigVisTrend.getShell() == null + || cigVisTrend.isDisposed()) { cigVisTrend = new CigVisTrendDlg(shell, siteList, StatusMessageType.CigVisTrend, null); cigVisTrend.open(); - cigVisTrend = null; + } else { + cigVisTrend.bringToTop(); } } }); diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/CigVisTrendDlg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/CigVisTrendDlg.java index cbc893ccac..e996d6b3d8 100755 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/CigVisTrendDlg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/CigVisTrendDlg.java @@ -71,6 +71,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * 9/12/2008 1444 grichard Accommodate separate message logs. * 3/31/2011 8774 rferrel killProcess when doing a disposed * 4/14/2011 8861 rferrel Use SaveImageDlg class + * 10/09/2912 1229 rferrel Made non-blocking * * * @@ -218,7 +219,8 @@ public class CigVisTrendDlg extends CaveSWTDialog { */ public CigVisTrendDlg(Shell parent, java.util.List icaos, StatusMessageType msgType, RGB statusCompRGB) { - super(parent, SWT.DIALOG_TRIM, CAVE.PERSPECTIVE_INDEPENDENT); + super(parent, SWT.DIALOG_TRIM, CAVE.PERSPECTIVE_INDEPENDENT + | CAVE.DO_NOT_BLOCK); setText("AvnFPS - Ceiling/Visibility Trend"); this.icaos = icaos; diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java index 4e68e83b36..677d8c62f5 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java @@ -66,9 +66,10 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * in initializeComponents * 10/12/2010 6009 rferrel Code clean up from making TafSiteConfig * a singleton - * 10/04/2012 1129 rferrel Made non-blocking. + * 10/04/2012 1229 rferrel Made non-blocking. * 10/08/2012 1229 rferrel Changes for non-blocking WindRosePlotDlg. * 10/09/2012 1229 rferrel Changes for non-blocking MetarDisplayDialog. + * 10/09/2012 1229 rferrel Changes for non-blocking CigVisTrendDlg. * * * @@ -325,11 +326,13 @@ public class ClimateMenuDlg extends CaveSWTDialog { trendBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - if (cigVisTrend == null) { + if (cigVisTrend == null || cigVisTrend.getShell() == null + || cigVisTrend.isDisposed()) { cigVisTrend = new CigVisTrendDlg(shell, stationList, statusMsgTypes[3], statusCompRGB); cigVisTrend.open(); - cigVisTrend = null; + } else { + cigVisTrend.bringToTop(); } } });