Issue #1229 Changes for non-blocking CigVisTrendDlg and removal of CigVisTrendAction.
Resolve merge conflict issues. Change-Id: I67e1860e7f2b3f355b28969d726bc938098fc615 Former-commit-id: 9374fe790f4fe40849cb8e94cbf61347ed372226
This commit is contained in:
parent
f5f6d1e1ed
commit
04efdb3275
4 changed files with 14 additions and 108 deletions
|
@ -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.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 23, 2010 mnash Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @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<String> 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;
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -218,7 +219,8 @@ public class CigVisTrendDlg extends CaveSWTDialog {
|
|||
*/
|
||||
public CigVisTrendDlg(Shell parent, java.util.List<String> 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;
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue