Merge "Issue #1229 Changes for non-blocking WindRosePlotDlg and removal of dead classes WindRoseAction and CigVisDistAction. Code review commemts." into development
Former-commit-id:5c657d9274
[formerlyadc694bd5e
] [formerly5c657d9274
[formerlyadc694bd5e
] [formerly2757c6b2f5
[formerly 6db273a106fd81f44167ba7493a952de1981cbfa]]] Former-commit-id:2757c6b2f5
Former-commit-id:34c706dbc5
[formerly2359f82869
] Former-commit-id:ad8fce33ac
This commit is contained in:
commit
e830535139
5 changed files with 13 additions and 211 deletions
|
@ -1,104 +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.CigVisDistributionDlg;
|
||||
import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
|
||||
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
|
||||
|
||||
/**
|
||||
* This class is a handler for bring up the Ceiling/Visibility Distribution
|
||||
* dialog.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 23, 2010 mnash Initial creation
|
||||
* Oct 08, 2012 #1229 rferrel Changes for non-clocking CigVisDistributionDlg.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mnash
|
||||
* @version 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
// No long used @see com.raytheon.viz.aviation.CigVisDistComponent
|
||||
// TODO remove from base line.
|
||||
public class CigVisDistAction extends AbstractHandler {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(CigVisDistAction.class);
|
||||
|
||||
private CigVisDistributionDlg cigVisDistDialog;
|
||||
|
||||
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 (cigVisDistDialog == null || cigVisDistDialog.getShell() == null
|
||||
|| cigVisDistDialog.isDisposed()) {
|
||||
cigVisDistDialog = new CigVisDistributionDlg(shell, siteList,
|
||||
StatusMessageType.Metar, null);
|
||||
cigVisDistDialog.open();
|
||||
} else {
|
||||
cigVisDistDialog.bringToTop();
|
||||
}
|
||||
|
||||
return 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.WindRosePlotDlg;
|
||||
import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
|
||||
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
|
||||
|
||||
/**
|
||||
* Action class for Climate's Wind Rose 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 WindRoseAction extends AbstractHandler {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(WindRoseAction.class);
|
||||
|
||||
private WindRosePlotDlg windRoseDialog;
|
||||
|
||||
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 (windRoseDialog == null || windRoseDialog.getShell().isDisposed()) {
|
||||
windRoseDialog = new WindRosePlotDlg(shell, siteList,
|
||||
StatusMessageType.WindRose, null);
|
||||
windRoseDialog.open();
|
||||
windRoseDialog = null;
|
||||
} else {
|
||||
windRoseDialog.getShell().setVisible(true);
|
||||
windRoseDialog.getShell().setFocus();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -97,6 +97,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* 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 WindRosePlotDlg.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -410,11 +411,13 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
|
|||
windRoseMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (windRose == null || windRose.isDisposed()) {
|
||||
if (windRose == null || windRose.getShell() == null
|
||||
|| windRose.isDisposed()) {
|
||||
windRose = new WindRosePlotDlg(shell, siteList,
|
||||
StatusMessageType.WindRose, null);
|
||||
windRose.open();
|
||||
windRose = null;
|
||||
} else {
|
||||
windRose.bringToTop();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -67,6 +67,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 10/12/2010 6009 rferrel Code clean up from making TafSiteConfig
|
||||
* a singleton
|
||||
* 10/04/2012 1129 rferrel Made non-blocking.
|
||||
* 10/08/2012 1229 rferrel Changes for non-blocking WindRosePlotDlg.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -279,11 +280,13 @@ public class ClimateMenuDlg extends CaveSWTDialog {
|
|||
windRoseBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (windRose == null || windRose.isDisposed()) {
|
||||
if (windRose == null || windRose.getShell() == null
|
||||
|| windRose.isDisposed()) {
|
||||
windRose = new WindRosePlotDlg(shell, stationList,
|
||||
statusMsgTypes[1], statusCompRGB);
|
||||
windRose.open();
|
||||
windRose = null;
|
||||
} else {
|
||||
windRose.bringToTop();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -83,6 +83,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 23JUL2012 15169 zhao Use Combo for 'Month' and 'Number of Months'
|
||||
* & disabled site controls while drawing
|
||||
* 04OCT2012 1229 rferrel Changes for non-blocking WindRoseConfigDlg.
|
||||
* 08OCT2012 1229 rferrel Made non-blocking.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -201,7 +202,8 @@ public class WindRosePlotDlg extends CaveSWTDialog {
|
|||
*/
|
||||
public WindRosePlotDlg(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("Wind Rose Plot");
|
||||
|
||||
this.icaos = icaos;
|
||||
|
|
Loading…
Add table
Reference in a new issue