Issue #1229 Chagnes for non-blocking MetarDisplayDialog and removal of MetarAction.
Change-Id: Ie2d8c762fa704b5c2562f9bc90ada00d3e0e4ca2 Former-commit-id: 53bfe4991330812aa8e5853967d1ec1f1a86a490
This commit is contained in:
parent
368974d799
commit
39624d1c5f
4 changed files with 14 additions and 107 deletions
|
@ -1,101 +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.MetarDisplayDialog;
|
||||
import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
|
||||
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
|
||||
|
||||
/**
|
||||
* Action class for the Climate's METAR Display.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 22, 2010 mnash Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mnash
|
||||
* @version 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
// TODO no longer used remove from the base line
|
||||
public class MetarAction extends AbstractHandler {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(MetarAction.class);
|
||||
|
||||
private MetarDisplayDialog metarDialog;
|
||||
|
||||
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 (metarDialog == null || metarDialog.getShell().isDisposed()) {
|
||||
metarDialog = new MetarDisplayDialog(shell, siteList,
|
||||
StatusMessageType.Metar, null);
|
||||
metarDialog.open();
|
||||
metarDialog = null;
|
||||
} else {
|
||||
metarDialog.getShell().setVisible(true);
|
||||
metarDialog.getShell().setFocus();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -96,8 +96,9 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Oct 04, 2012 #1229 rferrel Changes for non-blocking ClimateHistoryDlg.
|
||||
* Oct 08, 2012 #1229 rferrel Changes for non-blocking GenScriptsDlg.
|
||||
* Oct 08, 2012 #1229 rferrel Changes for non-blocking NCDCInvHistDlg.
|
||||
* Oct 08, 2012 #1229 rferrel Changes for non-clocking CigVisDistributionDlg.
|
||||
* 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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -396,11 +397,13 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
|
|||
metarsMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (metarDlg == null) {
|
||||
if (metarDlg == null || metarDlg.getShell() == null
|
||||
|| metarDlg.isDisposed()) {
|
||||
metarDlg = new MetarDisplayDialog(shell, siteList,
|
||||
StatusMessageType.Metar, null);
|
||||
metarDlg.open();
|
||||
metarDlg = null;
|
||||
} else {
|
||||
metarDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -68,6 +68,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* a singleton
|
||||
* 10/04/2012 1129 rferrel Made non-blocking.
|
||||
* 10/08/2012 1229 rferrel Changes for non-blocking WindRosePlotDlg.
|
||||
* 10/09/2012 1229 rferrel Changes for non-blocking MetarDisplayDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -261,11 +262,13 @@ public class ClimateMenuDlg extends CaveSWTDialog {
|
|||
metarsBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (metarDlg == null) {
|
||||
if (metarDlg == null || metarDlg.getShell() == null
|
||||
|| metarDlg.isDisposed()) {
|
||||
metarDlg = new MetarDisplayDialog(shell, stationList,
|
||||
statusMsgTypes[0], statusCompRGB);
|
||||
metarDlg.open();
|
||||
metarDlg = null;
|
||||
} else {
|
||||
metarDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -90,6 +90,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 4/4/2011 8896 rferrel Made timeout configurable
|
||||
* 4/8/2011 8838 rferrel Properly set up "Show Display"
|
||||
* 4/12/2011 8861 rferrel Added file permission check in savedata
|
||||
* 10/09/2012 1229 rferrel Change to non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -179,7 +180,8 @@ public class MetarDisplayDialog extends CaveSWTDialog implements
|
|||
*/
|
||||
public MetarDisplayDialog(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 - METAR Display");
|
||||
|
||||
this.icaos = icaos;
|
||||
|
|
Loading…
Add table
Reference in a new issue