D2DNsharp Dialog first working version
This commit is contained in:
parent
a3c3a08fdf
commit
afe0f644db
31 changed files with 1893 additions and 380 deletions
|
@ -22,7 +22,8 @@ Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.14.0",
|
|||
com.raytheon.uf.common.topo,
|
||||
com.raytheon.viz.pointdata,
|
||||
com.raytheon.uf.viz.image.export;bundle-version="1.14.0",
|
||||
org.eclipse.core.runtime;bundle-version="3.8.0"
|
||||
org.eclipse.core.runtime;bundle-version="3.8.0",
|
||||
gov.noaa.nws.ncep.ui.pgen
|
||||
Export-Package: com.raytheon.uf.viz.d2d.nsharp,
|
||||
com.raytheon.uf.viz.d2d.nsharp.display,
|
||||
com.raytheon.uf.viz.d2d.nsharp.rsc
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Bethel, AK (PABE)" id="raobRarotonga"
|
||||
menuText="Bethel, AK (PABE)" id="raobBethel_AK"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="70219"/>
|
||||
</contribute>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<substitute key="stationId" value="70133"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="St. Paul Island, AK (PASN)" id="raobSTPaulIsland_AK"
|
||||
menuText="St. Paul Island, AK (PASN)" id="raobStPaulIsland_AK"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="70308"/>
|
||||
</contribute>
|
||||
|
|
|
@ -77,13 +77,13 @@
|
|||
<substitute key="stationId" value="78970"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Howard AFB, PM (MPHO)" id="raobHowardAFB_PM "
|
||||
menuText="Howard AFB, PM (MPHO)" id="raobHowardAFB_PM"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="78806"/>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Guantanamo Bay, CU (MUGM)" id="raobPortland_ME"
|
||||
menuText="Guantanamo Bay, CU (MUGM)" id="raobGuantanamoBay_CU"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="78367"/>
|
||||
</contribute>
|
||||
|
@ -108,12 +108,12 @@
|
|||
<substitute key="stationId" value="81405"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Le Ralset, Guadeloupe (TFFR)" id="LeRalset_Guadeloupe"
|
||||
menuText="Le Ralset, Guadeloupe (TFFR)" id="raobLeRalset_Guadeloupe"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="78897"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="San Juan, PR (TJSJ)" id="raobWashington_DC"
|
||||
menuText="San Juan, PR (TJSJ)" id="raobSanJuan_PR"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="78526"/>
|
||||
</contribute>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Willis Island (94299)" id="raobWillis Island"
|
||||
menuText="Willis Island (94299)" id="raobWillisIsland"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="94299"/>
|
||||
</contribute>
|
||||
|
@ -155,7 +155,7 @@
|
|||
<substitute key="stationId" value="94750"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Sydney Arpt (YSSY)" id="raobSydney Arpt"
|
||||
menuText="Sydney Arpt (YSSY)" id="raobSydneyArpt"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="94767"/>
|
||||
</contribute>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<substitute key="stationId" value="71907"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Yarmouth, NS (CYQI)" id="raobAtlanta_GA"
|
||||
menuText="Yarmouth, NS (CYQI)" id="raobYarmouth_NS"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="71603"/>
|
||||
</contribute>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<substitute key="stationId" value="71801"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Toronto Int'l, ON (CYYZ)" id="raobTorontoIntl_ON "
|
||||
menuText="Toronto Int'l, ON (CYYZ)" id="raobTorontoIntl_ON"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="71624"/>
|
||||
</contribute>
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Ishigakijima (ROIG)" id="raobIshigakijima "
|
||||
menuText="Ishigakijima (ROIG)" id="raobIshigakijima"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="47918"/>
|
||||
</contribute>
|
||||
|
@ -168,7 +168,7 @@
|
|||
<substitute key="stationId" value="47945"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Clark AFB (RPMK)" id="raobClearkAFB"
|
||||
menuText="Clark AFB (RPMK)" id="raobClarkAFB"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="98327"/>
|
||||
</contribute>
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
<substitute key="stationId" value="76840"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Ciudad Del Carmen, MX (MCME)" id="raobCiudadDelCarmen_MX "
|
||||
menuText="Ciudad Del Carmen, MX (MCME)" id="raobCiudadDelCarmen_MX"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="76749"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Ciudad Victoria, MX (MCVM)" id="raobCiudadVictoria_MX "
|
||||
menuText="Ciudad Victoria, MX (MCVM)" id="raobCiudadVictoria_MX"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="76225"/>
|
||||
</contribute>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<substitute key="stationId" value="76649"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Isle of Guadalupe, MX (MILS)" id="raobIsleofGuadalupe_MX "
|
||||
menuText="Isle of Guadalupe, MX (MILS)" id="raobIsleofGuadalupe_MX"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="76151"/>
|
||||
</contribute>
|
||||
|
@ -70,12 +70,12 @@
|
|||
<substitute key="stationId" value="76361"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Chihuahua, MX (MMCU)" id="raobChihuahua_MX "
|
||||
menuText="Chihuahua, MX (MMCU)" id="raobChihuahua_MX"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="76225"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Mexico/Central, MX (MMDF)" id="raobCentral, MX"
|
||||
menuText="Mexico/Central, MX (MMDF)" id="raobCentral_MX"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="76679"/>
|
||||
</contribute>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Midway Island (Navy) (PMDY)" id="raobPortland_ME"
|
||||
menuText="Midway Island (Navy) (PMDY)" id="raobMidwayIs"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="91066"/>
|
||||
</contribute>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<substitute key="stationId" value="99027"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Honiara (AGGH)" id="raobHonlara"
|
||||
menuText="Honiara (AGGH)" id="raobHoniara"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="91517"/>
|
||||
</contribute>
|
||||
|
@ -72,12 +72,12 @@
|
|||
<substitute key="stationId" value="91592"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Guam/Taguac, GU (PGAC)" id="raobTaguac_GU "
|
||||
menuText="Guam/Taguac, GU (PGAC)" id="raobTaguac_GU"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="91217"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Guam/Anderson AFB, GU (PGUA)" id="raobAndersonAFB_GU "
|
||||
menuText="Guam/Anderson AFB, GU (PGUA)" id="raobAndersonAFB_GU"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="91218"/>
|
||||
</contribute>
|
||||
|
@ -122,7 +122,7 @@
|
|||
<substitute key="stationId" value="91413"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Wake Island (PWAK)" id="raobWake Island"
|
||||
menuText="Wake Island (PWAK)" id="raobWakeIsland"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="91245"/>
|
||||
</contribute>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Mys Uzlen (25399)" id="raobMys Uzlen"
|
||||
menuText="Mys Uzlen (25399)" id="raobMysUzlen"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="25399"/>
|
||||
</contribute>
|
||||
|
@ -135,12 +135,12 @@
|
|||
<substitute key="stationId" value="21824"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Anadyr' (UHMA)" id="raobnadyr'"
|
||||
menuText="Anadyr (UHMA)" id="raobAnadyr"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="25563"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Bukhta Provideniya (UHMD)" id="raobBukhta Provideniya"
|
||||
menuText="Bukhta Provideniya (UHMD)" id="raobBukhtaProvideniya"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="25594"/>
|
||||
</contribute>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<substitute key="stationId" value="72364"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Fort Worth, TX (KFWD)" id="raobFortWorth_TX "
|
||||
menuText="Fort Worth, TX (KFWD)" id="raobFortWorth_TX"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="72249"/>
|
||||
</contribute>
|
||||
|
@ -100,7 +100,7 @@
|
|||
<substitute key="stationId" value="72340"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Midland, TX (KMAF)" id="raobSanNicholasIsland_CA"
|
||||
menuText="Midland, TX (KMAF)" id="raobMidland_TX"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="72265"/>
|
||||
</contribute>
|
||||
|
@ -115,7 +115,7 @@
|
|||
<substitute key="stationId" value="72558"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Oklahoma City, OK (KOUN)" id="raobOklahomaCity_OK "
|
||||
menuText="Oklahoma City, OK (KOUN)" id="raobOklahomaCity_OK"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="72357"/>
|
||||
</contribute>
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
<substitute key="stationId" value="72221"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Wallops Island, VA (KWAL)" id="raobWallopsIsland_VA "
|
||||
menuText="Wallops Island, VA (KWAL)" id="raobWallopsIsland_VA"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="72402"/>
|
||||
</contribute>
|
||||
|
|
|
@ -35,12 +35,12 @@
|
|||
<substitute key="stationId" value="74004"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Yuma PG Site 2, AZ (K1Y8)" id="raobYuma_AZ"
|
||||
menuText="Yuma PG Site 2, AZ (K1Y8)" id="raobYumaPgSite2_AZ"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="74005"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Yuma PG Site 3, AZ (K1Y9)" id="raobYuma_AZ"
|
||||
menuText="Yuma PG Site 3, AZ (K1Y9)" id="raobYumaPgSite3_AZ"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="74006"/>
|
||||
</contribute>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<substitute key="stationId" value="72387"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Edwards AFB, CA (KEDW)" id="raobEdwardsAFB_CA "
|
||||
menuText="Edwards AFB, CA (KEDW)" id="raobEdwardsAFB_CA"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="72381"/>
|
||||
</contribute>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<substitute key="stationId" value="74626"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
|
||||
menuText="Reno, NV (KREV)" id="raobReno_NV "
|
||||
menuText="Reno, NV (KREV)" id="raobReno_NV"
|
||||
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
|
||||
<substitute key="stationId" value="72489"/>
|
||||
</contribute>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
class="com.raytheon.uf.viz.d2d.nsharp.display.D2DNSharpPaletteWindow"
|
||||
id="com.raytheon.uf.viz.d2d.nsharp.display.D2DNSharpPaletteWindow"
|
||||
name="NSHARP(D2D)"/>
|
||||
|
||||
</extension>
|
||||
|
||||
<extension point="org.eclipse.ui.perspectiveExtensions">
|
||||
|
@ -69,6 +70,10 @@
|
|||
</not>
|
||||
</enabledWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.nsharp.D2DNsharpViewAction"
|
||||
commandId="com.raytheon.uf.viz.d2d.nsharp.dialog">
|
||||
</handler>
|
||||
</extension>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.core.classContext">
|
||||
|
@ -79,5 +84,12 @@
|
|||
</contextId>
|
||||
</classContext>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.commands">
|
||||
<command
|
||||
id="com.raytheon.uf.viz.d2d.nsharp.dialog"
|
||||
name="D2DNsharp">
|
||||
</command>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
*
|
||||
* gov.noaa.nws.ncep.ui.nsharp.palette.NsharpViewAction
|
||||
*
|
||||
*
|
||||
* This code has been developed by the NCEP-SIB for use in the AWIPS2 system.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 06/25/2012 229 Chin Chen Initial coding
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
* @version 1.0
|
||||
*/
|
||||
package com.raytheon.uf.viz.d2d.nsharp;
|
||||
|
||||
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
public class D2DNsharpViewAction extends AbstractHandler {
|
||||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
/*
|
||||
* The viewID string is in the XML file for NSHARP extension point.
|
||||
*/
|
||||
String viewid = "com.raytheon.uf.viz.d2d.nsharp.display.D2DNSharpPaletteWindow";
|
||||
IWorkbenchPage wpage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
||||
IViewPart vpart = wpage.findView( viewid);
|
||||
try {
|
||||
if ( vpart == null ){
|
||||
vpart = wpage.showView(viewid );
|
||||
} else {
|
||||
if ( ! wpage.isPartVisible(vpart) ) vpart = wpage.showView( viewid );
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -19,14 +19,16 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.d2d.nsharp.display;
|
||||
|
||||
import gov.noaa.nws.ncep.ui.nsharp.view.NsharpPaletteWindow;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IViewSite;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import gov.noaa.nws.ncep.ui.nsharp.view.NsharpPaletteWindow;
|
||||
import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager;
|
||||
import com.raytheon.viz.ui.perspectives.VizPerspectiveListener;
|
||||
import com.raytheon.viz.ui.tools.AbstractModalTool;
|
||||
|
@ -101,8 +103,14 @@ public class D2DNSharpPaletteWindow extends NsharpPaletteWindow {
|
|||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
D2DNsharpHandleArchiveFile.openArchiveFile(getViewSite()
|
||||
.getShell());
|
||||
Shell shell = PlatformUI.getWorkbench()
|
||||
.getActiveWorkbenchWindow().getShell();
|
||||
|
||||
D2DNsharpLoadDialog loadDia = D2DNsharpLoadDialog.getInstance(shell);
|
||||
|
||||
if (loadDia != null) {
|
||||
loadDia.open();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -0,0 +1,383 @@
|
|||
/**
|
||||
*
|
||||
* com.raytheon.uf.viz.d2d.nsharp.view.D2DNsharpLoadDialog
|
||||
*
|
||||
* This java class performs the NSHARP D2DNsharpLoadDialog functions.
|
||||
* This code has been developed by the NCEP-SIB for use in the AWIPS2 system.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 03/23/2010 229 Chin Chen Initial coding
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
* @version 1.0
|
||||
*/
|
||||
package com.raytheon.uf.viz.d2d.nsharp.display;
|
||||
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpConstants;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor;
|
||||
|
||||
import com.raytheon.uf.viz.d2d.nsharp.display.map.D2DNsharpMapResource;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.display.D2DNsharpHandleArchiveFile;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.display.D2DNsharpObservedSoundingDialogContents;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Cursor;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.FontData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
||||
public class D2DNsharpLoadDialog extends Dialog {
|
||||
|
||||
private final static int DIALOG_WIDTH = 350;
|
||||
|
||||
private final static int DIALOG_HEIGHT = 920;
|
||||
|
||||
protected Composite top;
|
||||
|
||||
private static Composite dialogParent;
|
||||
|
||||
private static D2DNsharpLoadDialog INSTANCE = null;
|
||||
|
||||
private static Shell shell;
|
||||
|
||||
private org.eclipse.swt.widgets.List soundingTypeList;
|
||||
|
||||
public static final String[] soundingTypeStringArray = {
|
||||
"Observed Soundings", "Archive Files" };
|
||||
|
||||
public static final int OBSER_SND = 0;
|
||||
|
||||
public static final int ARCHIVE = 3; // TBDGPD 5;
|
||||
|
||||
private D2DNsharpObservedSoundingDialogContents obsDialog;
|
||||
|
||||
private Group soundingTypeGp;
|
||||
|
||||
private int activeLoadSoundingType;
|
||||
|
||||
private NcSoundingProfile.ObsSndType activeObsSndType = NcSoundingProfile.ObsSndType.BUFRUA;
|
||||
|
||||
private ArrayList<String> obsSelectedTimeList = new ArrayList<String>();
|
||||
|
||||
private String activeGpdProdName = "";
|
||||
|
||||
private ArrayList<String> gpdSelectedTimeList = new ArrayList<String>();
|
||||
|
||||
private Text text1;
|
||||
|
||||
private MessageBox mb;
|
||||
|
||||
private Cursor waitCursor = null;
|
||||
|
||||
private Font newFont;
|
||||
|
||||
public Font getNewFont() {
|
||||
return newFont;
|
||||
}
|
||||
|
||||
public D2DNsharpObservedSoundingDialogContents getObsDialog() {
|
||||
return obsDialog;
|
||||
}
|
||||
|
||||
public void setAndOpenMb(String msg) {
|
||||
if (mb != null) {
|
||||
mb.setMessage(msg);
|
||||
try {
|
||||
mb.open();
|
||||
} catch (Exception e) {
|
||||
mb = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
|
||||
mb.setMessage(msg);
|
||||
mb.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void createSndTypeList(Group TopLoadGp) {
|
||||
soundingTypeGp = new Group(TopLoadGp, SWT.SHADOW_ETCHED_IN);
|
||||
soundingTypeGp.setText("D2DSounding Type");
|
||||
soundingTypeGp.setFont(newFont);
|
||||
soundingTypeList = new org.eclipse.swt.widgets.List(soundingTypeGp,
|
||||
SWT.SINGLE | SWT.V_SCROLL);
|
||||
soundingTypeList.setBounds(soundingTypeGp.getBounds().x
|
||||
+ NsharpConstants.btnGapX, soundingTypeGp.getBounds().y
|
||||
+ NsharpConstants.labelGap, NsharpConstants.filelistWidth,
|
||||
NsharpConstants.filelistHeight);
|
||||
soundingTypeList.setFont(newFont);
|
||||
for (String loadStr : soundingTypeStringArray) {
|
||||
soundingTypeList.add(loadStr);
|
||||
}
|
||||
// create a selection listener to handle user's selection on list
|
||||
soundingTypeList.addListener(SWT.Selection, new Listener() {
|
||||
private String selectedProduct = null;
|
||||
|
||||
public void handleEvent(Event e) {
|
||||
if (soundingTypeList.getSelectionCount() > 0) {
|
||||
selectedProduct = soundingTypeList.getSelection()[0];
|
||||
D2DNsharpMapResource nsharpMapResource = D2DNsharpMapResource
|
||||
.getOrCreateNsharpMapResource();
|
||||
nsharpMapResource.setPoints(null);
|
||||
D2DNsharpMapResource.getMapEditor().refresh();
|
||||
NsharpEditor editor = NsharpEditor.getActiveNsharpEditor();
|
||||
if (editor != null)
|
||||
editor.refresh();
|
||||
|
||||
if (selectedProduct
|
||||
.equals(soundingTypeStringArray[OBSER_SND])) {
|
||||
if (activeLoadSoundingType != OBSER_SND) {
|
||||
cleanupDialog(activeLoadSoundingType);
|
||||
activeLoadSoundingType = OBSER_SND;
|
||||
obsDialog.createObsvdDialogContents();
|
||||
dialogParent.pack();
|
||||
dialogParent.layout(true);
|
||||
dialogParent.redraw();
|
||||
soundingTypeList.setSelection(OBSER_SND);
|
||||
}
|
||||
} else if (selectedProduct
|
||||
.equals(soundingTypeStringArray[ARCHIVE])) {
|
||||
if (activeLoadSoundingType != ARCHIVE) {
|
||||
cleanupDialog(activeLoadSoundingType);
|
||||
activeLoadSoundingType = ARCHIVE;
|
||||
D2DNsharpHandleArchiveFile.openArchiveFile(shell);
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void cleanSndTypeList() {
|
||||
if (soundingTypeList != null) {
|
||||
soundingTypeList.removeListener(SWT.Selection,
|
||||
soundingTypeList.getListeners(SWT.Selection)[0]);
|
||||
soundingTypeList.dispose();
|
||||
soundingTypeList = null;
|
||||
}
|
||||
if (soundingTypeGp != null) {
|
||||
soundingTypeGp.dispose();
|
||||
soundingTypeGp = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanSelf() {
|
||||
|
||||
if (text1 != null) {
|
||||
text1.dispose();
|
||||
text1 = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanupDialog(int activeLoadType) {
|
||||
switch (activeLoadType) {
|
||||
case OBSER_SND:
|
||||
obsDialog.cleanup();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setActiveLoadSoundingType(int activeLoadSoundingType) {
|
||||
this.activeLoadSoundingType = activeLoadSoundingType;
|
||||
}
|
||||
|
||||
public int getActiveLoadSoundingType() {
|
||||
return activeLoadSoundingType;
|
||||
}
|
||||
|
||||
public ArrayList<String> getObsSelectedTimeList() {
|
||||
return obsSelectedTimeList;
|
||||
}
|
||||
|
||||
public void setObsSelectedTimeList(ArrayList<String> obsSelectedTimeList) {
|
||||
this.obsSelectedTimeList = obsSelectedTimeList;
|
||||
}
|
||||
|
||||
public ArrayList<String> getGpdSelectedTimeList() {
|
||||
return gpdSelectedTimeList;
|
||||
}
|
||||
|
||||
public void setGpdSelectedTimeList(ArrayList<String> gpdSelectedTimeList) {
|
||||
this.gpdSelectedTimeList = gpdSelectedTimeList;
|
||||
}
|
||||
|
||||
public NcSoundingProfile.ObsSndType getActiveObsSndType() {
|
||||
return activeObsSndType;
|
||||
}
|
||||
|
||||
public void setActiveObsSndType(
|
||||
NcSoundingProfile.ObsSndType activeObsSndType) {
|
||||
this.activeObsSndType = activeObsSndType;
|
||||
}
|
||||
|
||||
public String getActiveGpdProdName() {
|
||||
return activeGpdProdName;
|
||||
}
|
||||
|
||||
public void setActiveGpdProdName(String activeGpdProdName) {
|
||||
this.activeGpdProdName = activeGpdProdName;
|
||||
}
|
||||
|
||||
static int count = 0;
|
||||
|
||||
public static D2DNsharpLoadDialog getAccess() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public D2DNsharpLoadDialog(Shell parentShell) throws VizException {
|
||||
super(parentShell);
|
||||
// set modeless, so mouse button can be used by others
|
||||
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE
|
||||
| SWT.SHELL_TRIM);
|
||||
|
||||
// System.out.println("loadDia constructed");
|
||||
activeLoadSoundingType = OBSER_SND;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
|
||||
* .Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void configureShell(Shell shell) {
|
||||
super.configureShell(shell);
|
||||
D2DNsharpLoadDialog.shell = shell;
|
||||
shell.setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
|
||||
shell.setText("D2DLoad");
|
||||
mb = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
|
||||
|
||||
mb.setMessage("User Input Error!");
|
||||
Font font = shell.getFont();
|
||||
FontData[] fontData = font.getFontData();
|
||||
for (int i = 0; i < fontData.length; i++) {
|
||||
fontData[i].setHeight(7);
|
||||
// fontData[i].setName("courier");
|
||||
}
|
||||
newFont = new Font(font.getDevice(), fontData);
|
||||
shell.setFont(newFont);
|
||||
}
|
||||
|
||||
private void createLoadContents(Composite parent) {
|
||||
dialogParent = parent;
|
||||
obsDialog = new D2DNsharpObservedSoundingDialogContents(dialogParent);
|
||||
obsDialog.createObsvdDialogContents();
|
||||
activeLoadSoundingType = OBSER_SND;
|
||||
soundingTypeList.setSelection(activeLoadSoundingType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the dialog area
|
||||
*/
|
||||
@Override
|
||||
public Control createDialogArea(Composite parent) {
|
||||
|
||||
top = (Composite) super.createDialogArea(parent);
|
||||
|
||||
GridLayout mainLayout = new GridLayout(1, false);
|
||||
mainLayout.marginHeight = 3;
|
||||
mainLayout.marginWidth = 3;
|
||||
createLoadContents(top);
|
||||
// shell.setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
|
||||
if (waitCursor == null)
|
||||
waitCursor = new Cursor(top.getDisplay(), SWT.CURSOR_WAIT);
|
||||
return top;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int open() {
|
||||
if (this.getShell() == null) {
|
||||
this.create();
|
||||
}
|
||||
this.getShell().setLocation(
|
||||
this.getShell().getParent().getLocation().x + 1100,
|
||||
this.getShell().getParent().getLocation().y + 200);
|
||||
D2DNsharpMapResource.bringMapEditorToTop();
|
||||
return super.open();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean close() {
|
||||
D2DNsharpMapResource nsharpMapResource = D2DNsharpMapResource.getMapRsc();
|
||||
if (nsharpMapResource != null)
|
||||
nsharpMapResource.setPoints(null);
|
||||
// System.out.println("loadDia closed");
|
||||
cleanSelf();
|
||||
cleanupDialog(activeLoadSoundingType);
|
||||
// INSTANCE = null;
|
||||
if (waitCursor != null)
|
||||
waitCursor.dispose();
|
||||
waitCursor = null;
|
||||
newFont.dispose();
|
||||
return (super.close());
|
||||
}
|
||||
|
||||
public boolean closeDiaOnly() {
|
||||
cleanSelf();
|
||||
return (super.close());
|
||||
}
|
||||
|
||||
// Only use Cancel button but NOT ok button
|
||||
@Override
|
||||
public void createButtonsForButtonBar(Composite parent) {
|
||||
|
||||
// create Cancel buttons by default, but use close label
|
||||
createButton(parent, IDialogConstants.CANCEL_ID,
|
||||
IDialogConstants.CLOSE_LABEL, false);
|
||||
|
||||
// cancelBtn.setBounds(cancelBtn.getBounds().x,
|
||||
// cancelBtn.getBounds().y+DIALOG_HEIGHT, 20, 10);
|
||||
// System.out.println("createButtonsForButtonBar cancelBtn bound"+cancelBtn.getBounds());
|
||||
}
|
||||
|
||||
public static D2DNsharpLoadDialog getInstance(Shell parShell) {
|
||||
// System.out.println("getInstance called");
|
||||
if (INSTANCE == null) {
|
||||
try {
|
||||
INSTANCE = new D2DNsharpLoadDialog(parShell);
|
||||
// System.out.println("new load dialog INSTANCE created");
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
return INSTANCE;
|
||||
|
||||
}
|
||||
|
||||
public void startWaitCursor() {
|
||||
if (waitCursor != null)
|
||||
top.setCursor(waitCursor);
|
||||
}
|
||||
|
||||
public void stopWaitCursor() {
|
||||
top.setCursor(null);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,397 @@
|
|||
/**
|
||||
*
|
||||
* gov.noaa.nws.ncep.ui.nsharp.view.ObservedSoundingDialogContents
|
||||
*
|
||||
* This java class performs the NSHARP D2DNsharpLoadDialog functions.
|
||||
* This code has been developed by the NCEP-SIB for use in the AWIPS2 system.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 01/2011 229 Chin Chen Initial coding
|
||||
* 09/14/2011 457 S. Gurung Renamed H5UAIR to NCUAIR
|
||||
* 07202015 RM#9173 Chin Chen use NcSoundingQuery.genericSoundingDataQuery() to query grid model sounding data
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
* @version 1.0
|
||||
*/
|
||||
package com.raytheon.uf.viz.d2d.nsharp.display;
|
||||
|
||||
import gov.noaa.nws.ncep.viz.soundingrequest.NcSoundingQuery;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingStnInfo;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingStnInfoCollection;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingTimeLines;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpConstants;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.display.map.D2DNsharpMapResource;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.text.DateFormatSymbols;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
|
||||
public class D2DNsharpObservedSoundingDialogContents {
|
||||
private Composite parent;
|
||||
|
||||
private org.eclipse.swt.widgets.List sndTimeList;
|
||||
|
||||
private Group btnGp, sndTimeListGp, topGp, midGp;
|
||||
|
||||
private boolean timeLimit = false;
|
||||
|
||||
private boolean rawData = false;
|
||||
|
||||
private Button timeBtn, bufruaBtn, uairBtn, rawBtn;
|
||||
|
||||
private String FILE_UAIR = "UAIR";
|
||||
|
||||
private String FILE_BUFRUA = "BUFRUA";
|
||||
|
||||
// private String FILE_DROP = "DROP";
|
||||
private NcSoundingProfile.ObsSndType currentSndType = NcSoundingProfile.ObsSndType.NONE;
|
||||
|
||||
private D2DNsharpLoadDialog ldDia;
|
||||
|
||||
private ArrayList<String> selectedTimeList = new ArrayList<String>();
|
||||
|
||||
private Font newFont;
|
||||
|
||||
public boolean isRawData() {
|
||||
return rawData;
|
||||
}
|
||||
|
||||
public NcSoundingProfile.ObsSndType getCurrentSndType() {
|
||||
return currentSndType;
|
||||
}
|
||||
|
||||
public D2DNsharpObservedSoundingDialogContents(Composite parent) {
|
||||
this.parent = parent;
|
||||
ldDia = D2DNsharpLoadDialog.getAccess();
|
||||
newFont = ldDia.getNewFont();
|
||||
}
|
||||
|
||||
private void createObsvdSndUairList() {
|
||||
sndTimeList.removeAll();
|
||||
|
||||
// use NcSoundingQuery to query
|
||||
NcSoundingTimeLines timeLines = NcSoundingQuery
|
||||
.soundingTimeLineQuery(currentSndType.toString());
|
||||
|
||||
if (timeLines != null && timeLines.getTimeLines() != null) {
|
||||
DateFormatSymbols dfs = new DateFormatSymbols();
|
||||
String[] defaultDays = dfs.getShortWeekdays();
|
||||
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
ldDia.startWaitCursor();
|
||||
for (Object timeLine : timeLines.getTimeLines()) {
|
||||
Timestamp synoptictime = (Timestamp) timeLine;
|
||||
if (synoptictime != null) {
|
||||
// need to format synoptictime to GMT time string.
|
||||
// Timestamp.toString produce a local time Not GMT time
|
||||
cal.setTimeInMillis(synoptictime.getTime());
|
||||
String dayOfWeek = defaultDays[cal
|
||||
.get(Calendar.DAY_OF_WEEK)];
|
||||
// String gmtTimeStr =
|
||||
// String.format("%1$ty%1$tm%1$td/%1$tH%1$tM %2$s", cal,
|
||||
// currentSndType.toString());
|
||||
String gmtTimeStr = String.format(
|
||||
"%1$ty%1$tm%1$td/%1$tH(%3$s) %2$s", cal,
|
||||
currentSndType.toString(), dayOfWeek);
|
||||
if (!timeLimit) {
|
||||
// System.out.println("not 00z and 12z only");
|
||||
sndTimeList.add(gmtTimeStr);
|
||||
} else {
|
||||
int hour = cal.get(Calendar.HOUR_OF_DAY);
|
||||
// System.out.println("00z and 12z only hour = "+ hour);
|
||||
if ((hour == 0) || (hour == 12))
|
||||
sndTimeList.add(gmtTimeStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
ldDia.stopWaitCursor();
|
||||
} else
|
||||
System.out.println("EDEX timeline query return null");
|
||||
|
||||
}
|
||||
|
||||
private void queryAndMarkStn(String selectedSndTime) {
|
||||
String selectTimetr = NcSoundingQuery
|
||||
.convertSoundTimeDispStringToRangeStartTimeFormat(selectedSndTime);
|
||||
D2DNsharpMapResource nsharpMapResource = D2DNsharpMapResource
|
||||
.getOrCreateNsharpMapResource();
|
||||
// Chin float lat, lon;
|
||||
double lat, lon;
|
||||
String stnInfoStr;
|
||||
|
||||
// use NcSoundingQuery to query stn info
|
||||
NcSoundingStnInfoCollection sndStnInfoCol = NcSoundingQuery.genericSoundingStnInfoQuery(currentSndType.toString(),null, selectTimetr) ;
|
||||
// .soundingStnInfoQuery(currentSndType.toString(), selectTimetr);
|
||||
if (sndStnInfoCol != null && sndStnInfoCol.getStationInfo() != null) {
|
||||
|
||||
NcSoundingStnInfo[] stnInfoAry = sndStnInfoCol.getStationInfo();
|
||||
// System.out.println("obs station number = "+ stnInfoAry.length );
|
||||
// Note: A same station may have many reports
|
||||
for (int i = 0; i < stnInfoAry.length; i++) {
|
||||
NcSoundingStnInfo stnInfo = stnInfoAry[i];
|
||||
Timestamp synoptictime = null;
|
||||
stnInfoStr = stnInfo.getStnId();
|
||||
if (stnInfoStr == null || stnInfoStr.length() < 1)
|
||||
stnInfoStr = "*";
|
||||
lat = stnInfo.getStationLatitude();
|
||||
lon = stnInfo.getStationLongitude();
|
||||
// elv = stnInfo.getStationElevation();
|
||||
synoptictime = (Timestamp) stnInfo.getSynopTime();
|
||||
|
||||
// convert to Nsharp's own station info struct
|
||||
NsharpStationInfo stn = new NsharpStationInfo();
|
||||
String packedStnInfoStr = stnInfoStr.replace(" ", "_");
|
||||
stn.setStnDisplayInfo(packedStnInfoStr + " " + selectedSndTime
|
||||
+ " " + currentSndType.toString());
|
||||
stn.setLongitude(lon);
|
||||
stn.setLatitude(lat);
|
||||
stn.setStnId(stnInfoStr);
|
||||
stn.setReftime(synoptictime);
|
||||
stn.setRangestarttime(synoptictime);
|
||||
stn.setSndType(currentSndType.toString());
|
||||
// System.out.println("sndType= "+currentSndType);
|
||||
// System.out.println("stn lat ="+stn.getLatitude() +
|
||||
// " lon="+stn.getLongitude());
|
||||
nsharpMapResource.addPoint(stn);
|
||||
}
|
||||
|
||||
D2DNsharpMapResource.bringMapEditorToTop();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleSndTimeSelection() {
|
||||
String selectedSndTime = null;
|
||||
if (sndTimeList.getSelectionCount() > 0) {
|
||||
D2DNsharpMapResource nsharpMapResource = D2DNsharpMapResource
|
||||
.getOrCreateNsharpMapResource();// D2DNsharpLoadDialog.getAccess().getD2DNsharpMapResource();
|
||||
nsharpMapResource.setPoints(null);
|
||||
selectedTimeList.clear();
|
||||
ldDia.startWaitCursor();
|
||||
for (int i = 0; i < sndTimeList.getSelectionCount(); i++) {
|
||||
selectedSndTime = sndTimeList.getSelection()[i];
|
||||
selectedTimeList.add(selectedSndTime);
|
||||
// System.out.println("selected sounding time is " +
|
||||
// selectedSndTime);
|
||||
int endIndex = selectedSndTime.indexOf(" ");
|
||||
String queryingSndTime = selectedSndTime.substring(0, endIndex);
|
||||
queryAndMarkStn(queryingSndTime);
|
||||
|
||||
}
|
||||
ldDia.setObsSelectedTimeList(selectedTimeList);
|
||||
ldDia.stopWaitCursor();
|
||||
}
|
||||
}
|
||||
|
||||
public void createObsvdDialogContents() {
|
||||
currentSndType = ldDia.getActiveObsSndType();
|
||||
timeLimit = false;
|
||||
rawData = false;
|
||||
topGp = new Group(parent, SWT.SHADOW_ETCHED_IN);
|
||||
topGp.setLayout(new GridLayout(2, false));
|
||||
|
||||
// ldDia.setShellSize(false);
|
||||
ldDia.createSndTypeList(topGp);
|
||||
|
||||
btnGp = new Group(topGp, SWT.SHADOW_ETCHED_IN);
|
||||
btnGp.setText("File Type");
|
||||
btnGp.setFont(newFont);
|
||||
|
||||
|
||||
bufruaBtn = new Button(btnGp, SWT.RADIO | SWT.BORDER);
|
||||
bufruaBtn.setText(FILE_BUFRUA);
|
||||
bufruaBtn.setEnabled(true);
|
||||
bufruaBtn.setBounds(btnGp.getBounds().x + NsharpConstants.btnGapX,
|
||||
btnGp.getBounds().y + NsharpConstants.labelGap,
|
||||
NsharpConstants.btnWidth, NsharpConstants.btnHeight);
|
||||
bufruaBtn.setFont(newFont);
|
||||
bufruaBtn.addListener(SWT.MouseUp, new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
sndTimeList.removeAll();
|
||||
currentSndType = NcSoundingProfile.ObsSndType.BUFRUA;
|
||||
ldDia.setActiveObsSndType(currentSndType);
|
||||
createObsvdSndUairList();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
uairBtn = new Button(btnGp, SWT.RADIO | SWT.BORDER);
|
||||
uairBtn.setText(FILE_UAIR);
|
||||
uairBtn.setEnabled(true);
|
||||
uairBtn.setBounds(btnGp.getBounds().x + NsharpConstants.btnGapX,
|
||||
bufruaBtn.getBounds().y + bufruaBtn.getBounds().height
|
||||
+ NsharpConstants.btnGapY, NsharpConstants.btnWidth,
|
||||
NsharpConstants.btnHeight);
|
||||
uairBtn.setFont(newFont);
|
||||
uairBtn.addListener(SWT.MouseUp, new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
sndTimeList.removeAll();
|
||||
currentSndType = NcSoundingProfile.ObsSndType.NCUAIR;
|
||||
ldDia.setActiveObsSndType(currentSndType);
|
||||
createObsvdSndUairList();
|
||||
// System.out.println("new obvSnd dialog uair btn");
|
||||
}
|
||||
});
|
||||
|
||||
midGp = new Group(parent, SWT.SHADOW_ETCHED_IN);
|
||||
midGp.setLayout(new GridLayout(2, false));
|
||||
timeBtn = new Button(midGp, SWT.CHECK | SWT.BORDER);
|
||||
timeBtn.setText("00Z and 12Z only");
|
||||
timeBtn.setEnabled(true);
|
||||
// timeBtn.setBounds(btnGp.getBounds().x+ NsharpConstants.btnGapX,
|
||||
// browseBtn.getBounds().y + browseBtn.getBounds().height+
|
||||
// NsharpConstants.btnGapY,
|
||||
// NsharpConstants.btnWidth,NsharpConstants.btnHeight);
|
||||
timeBtn.setFont(newFont);
|
||||
timeBtn.addListener(SWT.MouseUp, new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
if (timeBtn.getSelection())
|
||||
timeLimit = true;
|
||||
else
|
||||
timeLimit = false;
|
||||
|
||||
// refresh sounding list if file type is selected already
|
||||
if (currentSndType == NcSoundingProfile.ObsSndType.NCUAIR
|
||||
|| currentSndType == NcSoundingProfile.ObsSndType.BUFRUA) {
|
||||
createObsvdSndUairList();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
rawBtn = new Button(midGp, SWT.CHECK | SWT.BORDER);
|
||||
rawBtn.setText("raw data");
|
||||
rawBtn.setEnabled(true);
|
||||
rawBtn.setBounds(timeBtn.getBounds().x + timeBtn.getBounds().width,
|
||||
timeBtn.getBounds().y, timeBtn.getBounds().width,
|
||||
timeBtn.getBounds().height);
|
||||
rawBtn.setFont(newFont);
|
||||
rawBtn.addListener(SWT.MouseUp, new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
if (rawBtn.getSelection())
|
||||
rawData = true;
|
||||
else
|
||||
rawData = false;
|
||||
;
|
||||
}
|
||||
});
|
||||
// create file widget list
|
||||
sndTimeListGp = new Group(parent, SWT.SHADOW_ETCHED_IN);
|
||||
sndTimeListGp.setText("Sounding Times:");
|
||||
sndTimeListGp.setFont(newFont);
|
||||
sndTimeList = new org.eclipse.swt.widgets.List(sndTimeListGp,
|
||||
SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
|
||||
sndTimeList.setBounds(btnGp.getBounds().x + NsharpConstants.btnGapX,
|
||||
sndTimeListGp.getBounds().y + NsharpConstants.labelGap,
|
||||
NsharpConstants.listWidth, NsharpConstants.listHeight * 7);
|
||||
sndTimeList.setFont(newFont);
|
||||
|
||||
// create a selection listener to handle user's selection on list
|
||||
sndTimeList.addListener(SWT.Selection, new Listener() {
|
||||
// private String selectedSndTime=null;
|
||||
public void handleEvent(Event e) {
|
||||
handleSndTimeSelection();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (currentSndType == NcSoundingProfile.ObsSndType.NCUAIR
|
||||
|| currentSndType == NcSoundingProfile.ObsSndType.BUFRUA) {
|
||||
if (currentSndType == NcSoundingProfile.ObsSndType.NCUAIR)
|
||||
uairBtn.setSelection(true);
|
||||
else
|
||||
bufruaBtn.setSelection(true);
|
||||
createObsvdSndUairList();
|
||||
selectedTimeList = ldDia.getObsSelectedTimeList();
|
||||
Object[] selTimeObjectArray = selectedTimeList.toArray();
|
||||
String[] selTimeStringArray = Arrays.copyOf(selTimeObjectArray,
|
||||
selTimeObjectArray.length, String[].class);
|
||||
sndTimeList.setSelection(selTimeStringArray);
|
||||
handleSndTimeSelection();
|
||||
}
|
||||
}
|
||||
|
||||
public void cleanup() {
|
||||
if (sndTimeList != null) {
|
||||
sndTimeList.removeListener(SWT.Selection,
|
||||
sndTimeList.getListeners(SWT.Selection)[0]);
|
||||
sndTimeList.dispose();
|
||||
sndTimeList = null;
|
||||
}
|
||||
if (sndTimeListGp != null) {
|
||||
sndTimeListGp.dispose();
|
||||
sndTimeListGp = null;
|
||||
}
|
||||
if (timeBtn != null) {
|
||||
timeBtn.removeListener(SWT.MouseUp,
|
||||
timeBtn.getListeners(SWT.MouseUp)[0]);
|
||||
timeBtn.dispose();
|
||||
timeBtn = null;
|
||||
}
|
||||
if (rawBtn != null) {
|
||||
rawBtn.removeListener(SWT.MouseUp,
|
||||
rawBtn.getListeners(SWT.MouseUp)[0]);
|
||||
rawBtn.dispose();
|
||||
rawBtn = null;
|
||||
}
|
||||
if (midGp != null) {
|
||||
midGp.dispose();
|
||||
midGp = null;
|
||||
}
|
||||
/*
|
||||
* if(browseBtn != null){ browseBtn.removeListener(SWT.MouseUp,
|
||||
* browseBtn.getListeners(SWT.MouseUp)[0]); browseBtn.dispose();
|
||||
* browseBtn = null; }
|
||||
*
|
||||
*
|
||||
* if(tamBtn != null){ tamBtn.removeListener(SWT.MouseUp,
|
||||
* tamBtn.getListeners(SWT.MouseUp)[0]); tamBtn.dispose(); tamBtn =
|
||||
* null; }
|
||||
*/
|
||||
if (bufruaBtn != null) {
|
||||
bufruaBtn.removeListener(SWT.MouseUp,
|
||||
bufruaBtn.getListeners(SWT.MouseUp)[0]);
|
||||
bufruaBtn.dispose();
|
||||
bufruaBtn = null;
|
||||
}
|
||||
if (uairBtn != null) {
|
||||
uairBtn.removeListener(SWT.MouseUp,
|
||||
uairBtn.getListeners(SWT.MouseUp)[0]);
|
||||
uairBtn.dispose();
|
||||
uairBtn = null;
|
||||
}
|
||||
if (btnGp != null) {
|
||||
btnGp.dispose();
|
||||
btnGp = null;
|
||||
}
|
||||
/*
|
||||
* if(newTabBtn != null){ newTabBtn.removeListener(SWT.MouseUp,
|
||||
* newTabBtn.getListeners(SWT.MouseUp)[0]); newTabBtn.dispose();
|
||||
* newTabBtn = null; }
|
||||
*/
|
||||
D2DNsharpLoadDialog ldDia = D2DNsharpLoadDialog.getAccess();
|
||||
ldDia.cleanSndTypeList();
|
||||
if (topGp != null) {
|
||||
topGp.dispose();
|
||||
topGp = null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,248 @@
|
|||
/**
|
||||
*
|
||||
* com.raytheon.uf.viz.d2d.nsharp.display.map.D2DNsharpMapMouseHandler
|
||||
*
|
||||
* This java class performs the NSHARP Modal functions.
|
||||
* This code has been developed by the NCEP-SIB for use in the AWIPS2 system.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 03/23/2010 229 Chin Chen Initial coding
|
||||
* 03/11/2013 972 Greg Hull NatlCntrsEditor
|
||||
* 09/28/2015 RM#10295 Chin Chen Let sounding data query run in its own thread to avoid gui locked out during load
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
* @version 1.0
|
||||
*/
|
||||
package com.raytheon.uf.viz.d2d.nsharp.display.map;
|
||||
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.display.map.NsharpObservedSoundingQuery;
|
||||
import gov.noaa.nws.ncep.ui.pgen.tools.InputHandlerDefaultImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.ui.progress.UIJob;
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
|
||||
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.uf.viz.core.map.IMapDescriptor;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.display.D2DNsharpLoadDialog;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
public class D2DNsharpMapMouseHandler extends InputHandlerDefaultImpl {
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(D2DNsharpMapMouseHandler.class);
|
||||
|
||||
public D2DNsharpMapMouseHandler() {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private static final double NctextuiPointMinDistance = 45000;
|
||||
|
||||
private static D2DNsharpMapMouseHandler instance;
|
||||
|
||||
private double lat, lon;
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public static D2DNsharpMapMouseHandler getAccess() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDown(int, int,
|
||||
* int)
|
||||
*/
|
||||
@Override
|
||||
public boolean handleMouseDown(int x, int y, int button) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDownMove(int,
|
||||
* int, int) handle left button, so user be able to shift map while it is
|
||||
* down
|
||||
*/
|
||||
@Override
|
||||
public boolean handleMouseDownMove(int x, int y, int button) {
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleMouseMove(int x, int y) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.input.IInputHandler#handleMouseUp(int, int, int)
|
||||
* handle right button, so user be able to pick stn and print text report
|
||||
*/
|
||||
@Override
|
||||
public boolean handleMouseUp(int x, int y, int button) {
|
||||
if (!D2DNsharpMapResource.getMapRsc().isEditable())
|
||||
return false;
|
||||
// button 1 is left mouse button
|
||||
if (button == 1) {
|
||||
AbstractEditor mapEditor = D2DNsharpMapResource.getMapEditor();
|
||||
if (mapEditor != null) {
|
||||
// Check if mouse is in geographic extent
|
||||
Coordinate loc = mapEditor.translateClick(x, y);
|
||||
if (loc == null)
|
||||
return false;
|
||||
D2DNsharpLoadDialog loadDia = D2DNsharpLoadDialog.getAccess();
|
||||
if (loadDia != null) {
|
||||
int activeLoadType = loadDia
|
||||
.getActiveLoadSoundingType();
|
||||
List<NsharpStationInfo> points = D2DNsharpMapResource
|
||||
.getOrCreateNsharpMapResource().getPoints();
|
||||
if (points.isEmpty() == false) {
|
||||
|
||||
// get the stn close to loc "enough" and retrieve
|
||||
// report for it
|
||||
// Note::One stn may have more than one dataLine, if
|
||||
// user picked multiple data time lines
|
||||
List<NsharpStationInfo> stnPtDataLineLst = getPtWithinMinDist(
|
||||
points, loc);
|
||||
if (stnPtDataLineLst != null
|
||||
&& stnPtDataLineLst.size() > 0) {
|
||||
// hash map, use stn display info as key
|
||||
Map<String, List<NcSoundingLayer>> soundingLysLstMap = new HashMap<String, List<NcSoundingLayer>>();
|
||||
// String soundingType;
|
||||
if (activeLoadType == D2DNsharpLoadDialog.OBSER_SND) {
|
||||
NsharpObservedSoundingQuery obsQry = new NsharpObservedSoundingQuery(
|
||||
"Querying Sounding Data...");
|
||||
obsQry.getObservedSndData(stnPtDataLineLst,
|
||||
loadDia.getObsDialog().isRawData(),
|
||||
soundingLysLstMap);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (button == 3) {
|
||||
// button 3 is right button.
|
||||
bringSkewTEdToTop();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Chin Note: If calling NsharpEditor.bringSkewTEditorToTop() directly in
|
||||
* mouse handler API, e.g. handleMouseUp(), then handleMouseUp() will be
|
||||
* called one more time by System. Do not know the root cause of it. To
|
||||
* avoid handling such event twice (e.g. query sounding data twice), we will
|
||||
* call NsharpEditor.bringSkewTEditorToTop() from an UiJob.
|
||||
*/
|
||||
private void bringSkewTEdToTop() {
|
||||
Job uijob = new UIJob("bring skewT to top") {
|
||||
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||
NsharpEditor.bringEditorToTop();
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
};
|
||||
uijob.setSystem(true);
|
||||
uijob.schedule();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the nearest point of an selected element to the input point
|
||||
*
|
||||
* @param el
|
||||
* element
|
||||
* @param pt
|
||||
* input point
|
||||
* @return
|
||||
*/
|
||||
private List<NsharpStationInfo> getPtWithinMinDist(
|
||||
List<NsharpStationInfo> points, Coordinate pt) {
|
||||
|
||||
NsharpStationInfo thePoint = null;
|
||||
double minDistance = NctextuiPointMinDistance;
|
||||
GeodeticCalculator gc;
|
||||
List<NsharpStationInfo> thePoints = new ArrayList<NsharpStationInfo>();
|
||||
// can't assume this is a map Editor/MapDescriptor
|
||||
AbstractEditor mapEditor = D2DNsharpMapResource.getMapEditor();
|
||||
if (mapEditor != null) {
|
||||
IMapDescriptor desc = (IMapDescriptor) mapEditor
|
||||
.getActiveDisplayPane().getRenderableDisplay()
|
||||
.getDescriptor();
|
||||
gc = new GeodeticCalculator(desc.getCRS());
|
||||
gc.setStartingGeographicPoint(pt.x, pt.y);
|
||||
for (NsharpStationInfo point : points) {
|
||||
|
||||
gc.setDestinationGeographicPoint(point.getLongitude(),
|
||||
point.getLatitude());
|
||||
double dist;
|
||||
try {
|
||||
dist = gc.getOrthodromicDistance();
|
||||
if (dist < minDistance) {
|
||||
|
||||
minDistance = dist;
|
||||
thePoint = point;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.ERROR,
|
||||
"D2DNsharpMapMouseHandler: getOrthodromicDistance exception happened!",
|
||||
e);
|
||||
}
|
||||
}
|
||||
// Chin, there may be more than one point for a selected stn. As
|
||||
// user may selected more than one data time,
|
||||
// For same stn, each data time will have one point to represent it.
|
||||
// So, a stn may have more than one points
|
||||
if (thePoint != null) {
|
||||
for (NsharpStationInfo point : points) {
|
||||
if ((thePoint.getLatitude() == point.getLatitude())
|
||||
&& (thePoint.getLongitude() == point.getLongitude())) {
|
||||
thePoints.add(point);
|
||||
}
|
||||
}
|
||||
|
||||
// marked X on selected point
|
||||
D2DNsharpMapResource.getOrCreateNsharpMapResource()
|
||||
.setPickedPoint(thePoint);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return thePoints;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,510 @@
|
|||
/**
|
||||
*
|
||||
* com.raytheon.uf.viz.d2d.nsharp.display.map.D2DNsharpMapResource
|
||||
*
|
||||
* This java class performs the NSHARP Resource functions.
|
||||
* This code has been developed by the NCEP-SIB for use in the AWIPS2 system.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 03/23/2010 229 Chin Chen Initial coding
|
||||
* 08/17/2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw (2)
|
||||
* 03/11/2013 972 Greg Hull NatlCntrsEditor
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
* @version 1.0
|
||||
*/
|
||||
package com.raytheon.uf.viz.d2d.nsharp.display.map;
|
||||
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpConstants;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
|
||||
import gov.noaa.nws.ncep.ui.pgen.display.DisplayElementFactory;
|
||||
import gov.noaa.nws.ncep.ui.pgen.display.IDisplayable;
|
||||
import gov.noaa.nws.ncep.ui.pgen.elements.SymbolLocationSet;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Cursor;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.PixelExtent;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.map.IMapDescriptor;
|
||||
import com.raytheon.uf.viz.core.map.MapDescriptor;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.IInputHandler;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceList.RemoveListener;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
import com.raytheon.viz.ui.input.EditableManager;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
public class D2DNsharpMapResource extends
|
||||
AbstractVizResource<D2DNsharpMapResourceData, MapDescriptor> implements
|
||||
RemoveListener {
|
||||
private static D2DNsharpMapResource mapRsc = null;
|
||||
|
||||
private static D2DNsharpMapResourceData mapRscData = null;
|
||||
|
||||
private static AbstractEditor mapEditor = null;
|
||||
|
||||
private static D2DNsharpMapMouseHandler mouseHandler;
|
||||
|
||||
private static Cursor waitCursor = null;
|
||||
|
||||
private static Control cursorControl;
|
||||
|
||||
private static boolean mouseHandlerRegistered = false;
|
||||
|
||||
public static void bringMapEditorToTop() {
|
||||
// get current map editor, if non existent create one.
|
||||
try {
|
||||
if (mapEditor != null
|
||||
&& PlatformUI.getWorkbench() != null
|
||||
&& PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null
|
||||
&& PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getActivePage() != null) {
|
||||
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getActivePage().bringToTop(mapEditor);
|
||||
mapEditor.refresh();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static AbstractEditor getMapEditor() {
|
||||
return mapEditor;
|
||||
}
|
||||
|
||||
public static D2DNsharpMapResource getMapRsc() {
|
||||
return mapRsc;
|
||||
}
|
||||
|
||||
private D2DNsharpMapResourceData nsharpMapResourceData;
|
||||
|
||||
/** The set of symbols with similar attributes across many locations */
|
||||
private SymbolLocationSet symbolSet = null;
|
||||
|
||||
private SymbolLocationSet symbolToMark = null;
|
||||
|
||||
private List<NsharpStationInfo> points = new ArrayList<NsharpStationInfo>();
|
||||
|
||||
private List<NsharpStationInfo> pickedPoint = new ArrayList<NsharpStationInfo>();
|
||||
|
||||
public void setPickedPoint(NsharpStationInfo point) {
|
||||
this.pickedPoint.add(point);
|
||||
}
|
||||
|
||||
public List<NsharpStationInfo> getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void setPoints(List<NsharpStationInfo> points) {
|
||||
if (points == null) {
|
||||
this.pickedPoint.clear();
|
||||
symbolToMark = null;
|
||||
symbolSet = null;
|
||||
this.points.clear();
|
||||
} else {
|
||||
this.points = points;
|
||||
}
|
||||
}
|
||||
|
||||
public void addPoint(NsharpStationInfo point) {
|
||||
points.add(point);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
protected D2DNsharpMapResource(D2DNsharpMapResourceData d2dNsharpMapResourceData,
|
||||
LoadProperties loadProperties) {
|
||||
super(d2dNsharpMapResourceData, loadProperties);
|
||||
|
||||
// set the editable capability
|
||||
getCapability(EditableCapability.class).setEditable(true);
|
||||
|
||||
this.nsharpMapResourceData = d2dNsharpMapResourceData;
|
||||
|
||||
}
|
||||
|
||||
public static void startWaitCursor() {
|
||||
waitCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_WAIT);
|
||||
cursorControl = Display.getCurrent().getCursorControl();
|
||||
if (cursorControl != null && waitCursor != null)
|
||||
cursorControl.setCursor(waitCursor);
|
||||
}
|
||||
|
||||
public static void stopWaitCursor() {
|
||||
if (cursorControl != null && waitCursor != null) {
|
||||
cursorControl.setCursor(null);
|
||||
}
|
||||
if (waitCursor != null) {
|
||||
waitCursor.dispose();
|
||||
waitCursor = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void createMapEditor() {
|
||||
// create an editor MapEditor
|
||||
try {
|
||||
mapEditor = (AbstractEditor) EditorUtil.getActiveEditor();
|
||||
} catch (Exception ve) {
|
||||
System.out
|
||||
.println("D2DNsharpMapResource Could not load initial editor: "
|
||||
+ ve.getMessage());
|
||||
ve.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerMouseHandler() {
|
||||
if (mouseHandlerRegistered)
|
||||
return;
|
||||
|
||||
mouseHandler = getMouseHandler();
|
||||
if (mapEditor != null && mouseHandler != null) {
|
||||
mapEditor.registerMouseHandler((IInputHandler) mouseHandler);
|
||||
mouseHandlerRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void unregisterMouseHandler() {
|
||||
if (!mouseHandlerRegistered)
|
||||
return;
|
||||
mouseHandler = getMouseHandler();
|
||||
if (mapEditor != null && mouseHandler != null) {
|
||||
mapEditor.unregisterMouseHandler((IInputHandler) mouseHandler);
|
||||
mouseHandlerRegistered = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new MapResource and add it to the current editor.
|
||||
*
|
||||
* @return the MapResource
|
||||
*/
|
||||
public static D2DNsharpMapResource getOrCreateNsharpMapResource() {
|
||||
if (mapRsc == null) {
|
||||
if (mapEditor == null) {
|
||||
createMapEditor();
|
||||
}
|
||||
if (mapEditor != null) {
|
||||
IMapDescriptor desc = (IMapDescriptor) mapEditor
|
||||
.getActiveDisplayPane().getRenderableDisplay()
|
||||
.getDescriptor();
|
||||
try {
|
||||
if (mapRscData == null)
|
||||
mapRscData = new D2DNsharpMapResourceData();
|
||||
mapRsc = mapRscData.construct(new LoadProperties(), desc);
|
||||
desc.getResourceList().add(mapRsc);
|
||||
mapRsc.init(mapEditor.getActiveDisplayPane().getTarget());
|
||||
|
||||
// register mouse handler
|
||||
mouseHandler = getMouseHandler();
|
||||
mapEditor
|
||||
.registerMouseHandler((IInputHandler) mouseHandler);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mapRsc;
|
||||
}
|
||||
|
||||
public static void deleteNsharpMapResource() {
|
||||
// System.out.println("D2DNsharpMapResource:deleteNsharpMapResource ");
|
||||
if (mapRsc != null) {
|
||||
mapRsc.dispose();
|
||||
mapRsc = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when resource is disposed
|
||||
*
|
||||
* @see com.raytheon.viz.core.rsc.IVizResource#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void disposeInternal() {
|
||||
// System.out.println("D2DNsharpMapResource:disposeInternal "+
|
||||
// this.toString());
|
||||
|
||||
if (mapEditor != null) {
|
||||
mapEditor.unregisterMouseHandler(mouseHandler);
|
||||
mouseHandler = null;
|
||||
// close editor
|
||||
/*
|
||||
* if((PlatformUI.getWorkbench()!=
|
||||
* null)&&(PlatformUI.getWorkbench().getActiveWorkbenchWindow()!=
|
||||
* null) &&
|
||||
* (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage
|
||||
* ()!=null))
|
||||
* PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage
|
||||
* ().closeEditor(mapEditor, false);
|
||||
*/
|
||||
mapEditor = null;
|
||||
|
||||
}
|
||||
pickedPoint = null;
|
||||
points = null;
|
||||
symbolSet = null;
|
||||
symbolToMark = null;
|
||||
mapRsc = null;
|
||||
mapRscData = null;
|
||||
if (waitCursor != null)
|
||||
waitCursor.dispose();
|
||||
waitCursor = null;
|
||||
mouseHandlerRegistered = false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.IVizResource#getCoordinateReferenceSystem()
|
||||
*/
|
||||
public CoordinateReferenceSystem getCoordinateReferenceSystem() {
|
||||
|
||||
if (descriptor == null)
|
||||
return null;
|
||||
|
||||
return descriptor.getCRS();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.core.rsc.IVizResource#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
|
||||
return "NSHARP Resource";
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.core.rsc.IVizResource#init(com.raytheon.viz.core.
|
||||
* IGraphicsTarget)
|
||||
*/
|
||||
@Override
|
||||
public void initInternal(IGraphicsTarget target) throws VizException {
|
||||
// System.out.println("D2DNsharpMapResource:initInternal called");
|
||||
// mapfont = target.initializeFont("Monospace",
|
||||
// (float) (12 *
|
||||
// nsharpMapResourceData.getMarkerTextSize().getSoftwareSize()), null);
|
||||
|
||||
// make the nsharp map resource editable
|
||||
EditableManager.makeEditable(this,
|
||||
getCapability(EditableCapability.class).isEditable());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.IVizResource#isApplicable(com.raytheon.viz.
|
||||
* core.PixelExtent)
|
||||
*/
|
||||
public boolean isApplicable(PixelExtent extent) {
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private void generateSymbolForDrawing() {
|
||||
String type;
|
||||
float lineWidth = nsharpMapResourceData.getMarkerWidth();
|
||||
Boolean clear = false;
|
||||
|
||||
String category = new String("Marker");
|
||||
double sizeScale = nsharpMapResourceData.getMarkerSize();
|
||||
|
||||
if (points.isEmpty() == true) {
|
||||
symbolSet = null;
|
||||
} else {
|
||||
// SymbolLocationSet constructor requires a positive-length array of
|
||||
// Coordinate
|
||||
Coordinate[] locations = new Coordinate[points.size()];
|
||||
Color[] colors = new Color[] { new Color(
|
||||
NsharpConstants.color_green.red,
|
||||
NsharpConstants.color_green.green,
|
||||
NsharpConstants.color_green.blue) };
|
||||
// System.out.println( "generateSymbolSet: size ="+ points.size());
|
||||
int i = 0;
|
||||
for (NsharpStationInfo p : points) {
|
||||
double lon, lat;
|
||||
lon = p.getLongitude();
|
||||
lat = p.getLatitude();
|
||||
locations[i++] = new Coordinate(lon, lat);
|
||||
}
|
||||
type = nsharpMapResourceData.getMarkerType().toString();
|
||||
// System.out.println( "generateSymbolSet done size ="+ i);
|
||||
symbolSet = new SymbolLocationSet(null, colors, lineWidth,
|
||||
sizeScale, clear, locations, category, type);
|
||||
|
||||
}
|
||||
// generate symbol for picked stn to mark X
|
||||
if (pickedPoint != null && pickedPoint.size() > 0) {
|
||||
Coordinate[] locations = new Coordinate[pickedPoint.size()];
|
||||
int i = 0;
|
||||
for (NsharpStationInfo p : pickedPoint) {
|
||||
double lon, lat;
|
||||
lon = p.getLongitude();
|
||||
lat = p.getLatitude();
|
||||
locations[i++] = new Coordinate(lon, lat);
|
||||
}
|
||||
type = nsharpMapResourceData.getStnMarkerType().toString();
|
||||
Color[] colors = new Color[] { new Color(
|
||||
NsharpConstants.color_red.red,
|
||||
NsharpConstants.color_red.green,
|
||||
NsharpConstants.color_red.blue) };
|
||||
symbolToMark = new SymbolLocationSet(null, colors, lineWidth,
|
||||
sizeScale * 2, clear, locations, category, type);
|
||||
} else
|
||||
symbolToMark = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.drawables.IRenderable#paint(com.raytheon.viz.core
|
||||
* .IGraphicsTarget, com.raytheon.viz.core.drawables.PaintProperties)
|
||||
*/
|
||||
@Override
|
||||
public void paintInternal(IGraphicsTarget target, PaintProperties paintProps)
|
||||
throws VizException {
|
||||
// System.out.println("paintInternal called!");
|
||||
// IFont font = target.initializeFont("Monospace",
|
||||
// (float) (12 *
|
||||
// nsharpMapResourceData.getMarkerTextSize().getSoftwareSize()), null);
|
||||
|
||||
generateSymbolForDrawing();
|
||||
DisplayElementFactory df = new DisplayElementFactory(target,
|
||||
this.descriptor);
|
||||
if (symbolSet != null) {
|
||||
ArrayList<IDisplayable> elements = df.createDisplayElements(
|
||||
symbolSet, paintProps);
|
||||
for (IDisplayable each : elements) {
|
||||
try {
|
||||
each.draw(target, paintProps);
|
||||
each.dispose();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// System.out.println("paintInternal caught draw exception!");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (symbolToMark != null) {
|
||||
ArrayList<IDisplayable> elements = df.createDisplayElements(
|
||||
symbolToMark, paintProps);
|
||||
for (IDisplayable each : elements) {
|
||||
try {
|
||||
each.draw(target, paintProps);
|
||||
each.dispose();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// System.out.println("paintInternal caught draw exception!");
|
||||
}
|
||||
}
|
||||
}
|
||||
// font.dispose();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.capabilities.IProjectableResource#isProjectable
|
||||
* (org.opengis.referencing.crs.CoordinateReferenceSystem)
|
||||
*/
|
||||
public boolean isProjectable(CoordinateReferenceSystem mapData) {
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.capabilities.IProjectableResource#project(org
|
||||
* .opengis.referencing.crs.CoordinateReferenceSystem)
|
||||
*/
|
||||
@Override
|
||||
public void project(CoordinateReferenceSystem mapData) throws VizException {
|
||||
// System.out.println("NctextuiResource: project ");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current mouse handler.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static D2DNsharpMapMouseHandler getMouseHandler() {
|
||||
|
||||
if (mouseHandler == null) {
|
||||
|
||||
mouseHandler = new D2DNsharpMapMouseHandler();
|
||||
|
||||
}
|
||||
|
||||
return mouseHandler;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean okToUnload() {
|
||||
/*
|
||||
* DisAllow unloading of Resource
|
||||
*/
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyRemove(ResourcePair rp) throws VizException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the resource is currently editable
|
||||
*
|
||||
* @return editable
|
||||
*/
|
||||
public boolean isEditable() {
|
||||
return getCapability(EditableCapability.class).isEditable();
|
||||
}
|
||||
|
||||
public void setEditable(boolean enable) {
|
||||
getCapability(EditableCapability.class).setEditable(enable);
|
||||
EditableManager.makeEditable(this,
|
||||
getCapability(EditableCapability.class).isEditable());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
*
|
||||
* com.raytheon.uf.viz.d2d.nsharp.display.map.D2DNsharpMapResourceData
|
||||
*
|
||||
* This java class performs the NSHARP ResourceData functions.
|
||||
* This code has been developed by the NCEP-SIB for use in the AWIPS2 system.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 03/23/2010 229 Chin Chen Initial coding
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
* @version 1.0
|
||||
*/
|
||||
package com.raytheon.uf.viz.d2d.nsharp.display.map;
|
||||
|
||||
import gov.noaa.nws.ncep.ui.nsharp.display.map.NsharpMapResource;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.display.map.NsharpMapResourceData;
|
||||
import gov.noaa.nws.ncep.viz.common.ui.Markers.MarkerState;
|
||||
import gov.noaa.nws.ncep.viz.common.ui.Markers.MarkerTextSize;
|
||||
import gov.noaa.nws.ncep.viz.common.ui.Markers.MarkerType;
|
||||
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractResourceData;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
|
||||
public class D2DNsharpMapResourceData extends AbstractResourceData {
|
||||
|
||||
private MarkerState markerState = MarkerState.MARKER_ONLY;
|
||||
|
||||
private MarkerType markerType = MarkerType.DIAMOND;
|
||||
|
||||
private Float markerSize = 1f;
|
||||
|
||||
private Integer markerWidth = 2;
|
||||
|
||||
private MarkerTextSize markerTextSize = MarkerTextSize.MEDIUM;
|
||||
|
||||
private String mapName = "NSHARP";
|
||||
|
||||
private MarkerType stnMarkerType = MarkerType.LARGE_X;
|
||||
|
||||
public MarkerType getStnMarkerType() {
|
||||
return stnMarkerType;
|
||||
}
|
||||
|
||||
public D2DNsharpMapResourceData() {
|
||||
super();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.rsc.AbstractResourceData#construct(com.raytheon
|
||||
* .uf.viz.core.comm.LoadProperties,
|
||||
* com.raytheon.uf.viz.core.drawables.IDescriptor)
|
||||
*/
|
||||
@Override
|
||||
public D2DNsharpMapResource construct(LoadProperties loadProperties,
|
||||
IDescriptor descriptor) throws VizException {
|
||||
// TODO Auto-generated method stub
|
||||
return new D2DNsharpMapResource(this, loadProperties);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.rsc.AbstractResourceData#update(java.lang.Object
|
||||
* )
|
||||
*/
|
||||
@Override
|
||||
public void update(Object updateData) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || !(obj instanceof D2DNsharpMapResourceData))
|
||||
return false;
|
||||
D2DNsharpMapResourceData rdata = (D2DNsharpMapResourceData) obj;
|
||||
if (this.markerState.equals(rdata.getMarkerState())
|
||||
&& this.markerType.equals(rdata.getMarkerType())
|
||||
&& this.markerSize.equals(rdata.getMarkerSize())
|
||||
&& this.markerWidth.equals(rdata.getMarkerWidth())
|
||||
&& this.markerTextSize.equals(rdata.getMarkerTextSize())
|
||||
&& this.stnMarkerType.equals(rdata.getStnMarkerType()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public MarkerState getMarkerState() {
|
||||
return markerState;
|
||||
}
|
||||
|
||||
public void setMarkerState(MarkerState markerState) {
|
||||
this.markerState = markerState;
|
||||
}
|
||||
|
||||
public MarkerType getMarkerType() {
|
||||
return markerType;
|
||||
}
|
||||
|
||||
public void setMarkerType(MarkerType markerType) {
|
||||
this.markerType = markerType;
|
||||
}
|
||||
|
||||
public Float getMarkerSize() {
|
||||
return markerSize;
|
||||
}
|
||||
|
||||
public void setMarkerSize(Float markerSize) {
|
||||
this.markerSize = markerSize;
|
||||
}
|
||||
|
||||
public Integer getMarkerWidth() {
|
||||
return markerWidth;
|
||||
}
|
||||
|
||||
public void setMarkerWidth(Integer markerWidth) {
|
||||
this.markerWidth = markerWidth;
|
||||
}
|
||||
|
||||
public MarkerTextSize getMarkerTextSize() {
|
||||
return markerTextSize;
|
||||
}
|
||||
|
||||
public void setMarkerTextSize(MarkerTextSize markerTextSize) {
|
||||
this.markerTextSize = markerTextSize;
|
||||
}
|
||||
|
||||
public String getMapName() {
|
||||
return mapName;
|
||||
}
|
||||
|
||||
public void setMapName(String mapName) {
|
||||
this.mapName = mapName;
|
||||
}
|
||||
}
|
|
@ -1,169 +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.uf.viz.d2d.nsharp.rsc.action;
|
||||
|
||||
|
||||
import gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpResourceHandler;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.view.NsharpPrintHandle;
|
||||
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.swt.printing.PrintDialog;
|
||||
import org.eclipse.swt.printing.PrinterData;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.uf.viz.core.IDisplayPane;
|
||||
import com.raytheon.uf.viz.core.datastructure.LoopProperties;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.image.export.handler.PrintImageCaptureHandler;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
|
||||
/**
|
||||
* Print the current map
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 26, 2006 chammack Initial Creation.
|
||||
* Aug 08, 2008 #703 randerso fixed bug, changed to scale to fit
|
||||
* paper and rotate if necessary
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
*/
|
||||
public class NSharpPrintScreenAction extends PrintImageCaptureHandler {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
|
||||
* ExecutionEvent)
|
||||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
NsharpEditor editor = null;
|
||||
IEditorPart part = EditorUtil.getActiveEditor();
|
||||
if (part instanceof NsharpEditor) {
|
||||
editor = (NsharpEditor) part;
|
||||
}
|
||||
if (editor == null) {
|
||||
return super.execute(event);
|
||||
}
|
||||
|
||||
NsharpResourceHandler handler = ((NsharpEditor) editor).getRscHandler();
|
||||
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
// display the printer dialog to get print options
|
||||
PrintDialog pd = new PrintDialog(shell);
|
||||
String frameMode = event.getParameter("frameSelection");
|
||||
if (frameMode == null || frameMode.equalsIgnoreCase("current")) {
|
||||
// selection doesn't seem to work.
|
||||
pd.setScope(PrinterData.PAGE_RANGE);
|
||||
pd.setStartPage(handler.getCurrentIndex()+1);//Chin NsharpFrameIndexUtil.getCurrentIndex(handler) + 1);
|
||||
pd.setEndPage(handler.getCurrentIndex()+1); // Chin NsharpFrameIndexUtil.getCurrentIndex(handler) + 1);
|
||||
} else if (frameMode.equalsIgnoreCase("all")) {
|
||||
pd.setScope(PrinterData.ALL_PAGES);
|
||||
} else {
|
||||
throw new ExecutionException("Invalid frameMode: " + frameMode);
|
||||
}
|
||||
PrinterData printerData = pd.open();
|
||||
if (printerData == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
NsharpPrintHandle handle = new NsharpPrintHandle();
|
||||
handle.createPrinter(printerData);
|
||||
if (handle.startJob()) {
|
||||
switch (pd.getScope()) {
|
||||
case PrinterData.ALL_PAGES: {
|
||||
try {
|
||||
printAllFrames(handle, editor);
|
||||
} catch (VizException e) {
|
||||
throw new ExecutionException(
|
||||
"Error occurred while writing image", e);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PrinterData.PAGE_RANGE: {
|
||||
try {
|
||||
printFrames(handle, editor, pd.getStartPage() - 1,
|
||||
pd.getEndPage());
|
||||
} catch (VizException e) {
|
||||
throw new ExecutionException(
|
||||
"Error occurred while writing image", e);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PrinterData.SELECTION: {
|
||||
printImage(handle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
handle.endJob();
|
||||
|
||||
}
|
||||
handle.disposePrinter();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void printAllFrames(NsharpPrintHandle printer, NsharpEditor editor)
|
||||
throws VizException {
|
||||
printFrames(printer, editor, 0, editor.getRscHandler().getFrameCount()); //Chin NsharpFrameIndexUtil.getFrameCount(editor.getRscHandler()));
|
||||
}
|
||||
|
||||
private void printFrames(NsharpPrintHandle printer, NsharpEditor editor,
|
||||
int startIndex, int endIndex) throws VizException {
|
||||
NsharpResourceHandler handler = ((NsharpEditor) editor).getRscHandler();
|
||||
IDisplayPane pane = editor.getActiveDisplayPane();
|
||||
int startingIndex = handler.getCurrentIndex();//Chin NsharpFrameIndexUtil.getCurrentIndex(handler);
|
||||
LoopProperties loopProperties = ((AbstractEditor) editor)
|
||||
.getLoopProperties();
|
||||
renderPane(pane, loopProperties);
|
||||
for (int i = startIndex; i < endIndex; i++) {
|
||||
//Chin NsharpFrameIndexUtil.setCurrentIndex(handler, i);
|
||||
if(handler.setCurrentIndex(i)== false)
|
||||
continue;
|
||||
pane.refresh();
|
||||
renderPane(pane, loopProperties);
|
||||
printImage(printer);
|
||||
}
|
||||
handler.setCurrentIndex(startingIndex); // Chin NsharpFrameIndexUtil.setCurrentIndex(handler, startingIndex);
|
||||
pane.refresh();
|
||||
renderPane(pane, loopProperties);
|
||||
}
|
||||
|
||||
private void printImage(NsharpPrintHandle printer) {
|
||||
printer.printPage();
|
||||
}
|
||||
|
||||
}
|
|
@ -55,6 +55,12 @@
|
|||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.npp.crimss"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.dataplugin.npp.nucaps"
|
||||
download-size="0"
|
||||
|
|
|
@ -36,9 +36,6 @@ The viirs day night band can be displayed with either channelType=DNB or channel
|
|||
<mapping key="parameter">
|
||||
<constraint constraintValue="0.7Ref" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="region">
|
||||
<constraint constraintValue="${region}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="viirs" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
|
|
|
@ -19,5 +19,5 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuContributionFile>
|
||||
<include installTo="menu:NPPProducts?after=Imagery" fileName="menus/npp/viirs/viirsMenuItems.xml"/>
|
||||
<include installTo="menu:satellite" fileName="menus/npp/viirs/viirsMenuItems.xml"/>
|
||||
</menuContributionFile>
|
|
@ -19,20 +19,26 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="titleItem" titleText="------ VIIRS ------" id="ImageryLine"/>
|
||||
<contribute xsi:type="subMenu" menuText="CONUS Imagery" id="CONUSid">
|
||||
<contribute xsi:type="subinclude" fileName="menus/npp/viirs/viirsBundleItems.xml">
|
||||
<substitute key="region" value="CONUS"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="titleItem" titleText="------ NPP VIIRS ------" id="ImageryLine"/>
|
||||
<!-- NCC Near Constant Contrast -->
|
||||
<contribute xsi:type="bundleItem" file="bundles/npp/viirs/viirsDayNightBandImagery.xml"
|
||||
menuText="Near Constant Contrast (0.7u)" id="NCC0.7">
|
||||
<substitute key="channelType" value="NCC"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Alaska Imagery" id="Alaskaid">
|
||||
<contribute xsi:type="subinclude" fileName="menus/npp/viirs/viirsBundleItems.xml">
|
||||
<substitute key="region" value="Alaska"/>
|
||||
</contribute>
|
||||
<!-- AK VIIRS bands available on NOAAport -->
|
||||
<contribute xsi:type="bundleItem" file="bundles/npp/viirs/viirsImagery.xml"
|
||||
menuText="Alaska - Imagery Band 1 (0.64u)" id="Img0.64">
|
||||
<substitute key="parameter" value="0.64Ref"/>
|
||||
<substitute key="region" value="Alaska"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Pacific Imagery" id="Pacificid">
|
||||
<contribute xsi:type="subinclude" fileName="menus/npp/viirs/viirsBundleItems.xml">
|
||||
<substitute key="region" value="Pacific"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/npp/viirs/viirsImagery.xml"
|
||||
menuText="Alaska - Imagery Band 4 (3.74u)" id="Img3.74">
|
||||
<substitute key="parameter" value="3.74BT"/>
|
||||
<substitute key="region" value="Alaska"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/npp/viirs/viirsImagery.xml"
|
||||
menuText="Alaska - Imagery Band 5 (11.45u)" id="Img11.45">
|
||||
<substitute key="parameter" value="11.45BT"/>
|
||||
<substitute key="region" value="Alaska"/>
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -19,15 +19,14 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/npp/soundingAvailability.xml"
|
||||
menuText="NUCAPS Soundings" id="NUCAPSAvailability">
|
||||
<substitute key="name" value="NUCAPS"/>
|
||||
<substitute key="pluginName" value="nucaps"/>
|
||||
<substitute key="soundingResourceData" value="com.raytheon.uf.viz.npp.nucaps.NucapsNSharpResourceData"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" id="NPPProducts" menuText="NPP Products">
|
||||
<contribute xsi:type="separator" id="Imagery" visible="false"/>
|
||||
<contribute xsi:type="titleItem" id="SoundingsTitle" titleText="------ Soundings ------"/>
|
||||
<contribute xsi:type="separator" id="Soundings" visible="false"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/npp/soundingAvailability.xml"
|
||||
menuText="CrIMSS Sounding Availability" id="CrIMSSAvailability">
|
||||
<substitute key="name" value="CrIMSS"/>
|
||||
<substitute key="pluginName" value="crimss"/>
|
||||
<substitute key="soundingResourceData" value="com.raytheon.uf.viz.npp.crimss.CrimssNSharpResourceData"/>
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -19,6 +19,40 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/Scatterometer.xml"
|
||||
menuText="ASCAT Winds 25 km" id="ASCATWinds">
|
||||
<substitute key="legend" value="ASCAT"/>
|
||||
<substitute key="svg" value="ascatPlotDesign.svg"/>
|
||||
<substitute key="plugin" value="bufrascat"/>
|
||||
<substitute key="posOffset" value="2650"/>
|
||||
<substitute key="negOffset" value="2650"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="SSM/I Point Data">
|
||||
<contribute xsi:type="titleItem"
|
||||
titleText="------ SSM/I Data ------" id="SSMIDataLine"/>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIWindPlot.xml"
|
||||
menuText="SSM/I Wind Speeds" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiWindPlotDesign.svg"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIPlot.xml"
|
||||
menuText="SSM/I Precip. Water" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiPWPlotDesign.svg"/>
|
||||
<substitute key="legend" value="SSM/I Precipitable Water (kg/m**2)"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIPlot.xml"
|
||||
menuText="SSM/I Sea Temperature" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiSTPlotDesign.svg"/>
|
||||
<substitute key="legend" value="SSM/I Sea Temperature (C)"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIPlot.xml"
|
||||
menuText="SSM/I VIL" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiVILPlotDesign.svg"/>
|
||||
<substitute key="legend" value="SSM/I Vert. Integ. Water (kg/(m**2))"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="GOES High Density Winds">
|
||||
<contribute xsi:type="titleItem"
|
||||
titleText="------ Satellite-Derived Winds ------" id="SatDerivedWindLine" />
|
||||
|
@ -118,95 +152,6 @@
|
|||
<substitute key="between" value="90100--105000" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="MTSAT High Density Winds">
|
||||
<contribute xsi:type="titleItem"
|
||||
titleText="------ Satellite-Derived Winds ------" id="SatDerivedWindLine" />
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteWindPlots.xml"
|
||||
menuText="IR Plot" id="irPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="satType" value="IR" />
|
||||
<substitute key="legend" value="IR" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteWindPlots.xml"
|
||||
menuText="Water Vapor Plot" id="waterVaporPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="satType" value="WV" />
|
||||
<substitute key="legend" value="Water Vapor" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteWindPlots.xml"
|
||||
menuText="Visible Plot" id="visiblePlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="satType" value="Vis" />
|
||||
<substitute key="legend" value="Visible" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/Satellite3_9WindPlots.xml"
|
||||
menuText="IR 3.9u Plot" id="ir3.9uPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="MySeparatorId" />
|
||||
<contribute xsi:type="titleItem"
|
||||
titleText="------ Satellite Layer Winds ------" id="SatLayerdWindLine" />
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="200hPa Layer Plot" id="200hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="225mb-100mb" />
|
||||
<substitute key="between" value="10000--22600" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="250hPa Layer Plot" id="250hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="275mb-225mb" />
|
||||
<substitute key="between" value="22600--27500" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="300hPa Layer Plot" id="300hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="350mb-275mb" />
|
||||
<substitute key="between" value="27600--35000" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="400hPa Layer Plot" id="400hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="450mb-350mb" />
|
||||
<substitute key="between" value="35100--45000" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="500hPa Layer Plot" id="500hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="600mb-450mb" />
|
||||
<substitute key="between" value="45100--60000" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="700hPa Layer Plot" id="700hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="775mb-600mb" />
|
||||
<substitute key="between" value="60100--77500" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="850hPa Layer Plot" id="850hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="900mb-775mb" />
|
||||
<substitute key="between" value="77600--90000" />
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SatelliteLayerPlot.xml"
|
||||
menuText="925hPa Layer Plot" id="925hPaLayerPlot">
|
||||
<substitute key="pluginName" value="bufrmthdw" />
|
||||
<substitute key="source" value="MTSAT"/>
|
||||
<substitute key="legend" value="1050mb-900mb" />
|
||||
<substitute key="between" value="90100--105000" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<!--
|
||||
<contribute xsi:type="bundleItem" file="bundles/Scatterometer_quikscat.xml"
|
||||
menuText="QuikSCAT 12.5 km" id="QuikSCAT">
|
||||
|
@ -217,50 +162,4 @@
|
|||
<substitute key="negOffset" value="5400"/>
|
||||
</contribute>
|
||||
-->
|
||||
<contribute xsi:type="bundleItem" file="bundles/Scatterometer.xml"
|
||||
menuText="ASCAT Winds 25 km" id="ASCATWinds">
|
||||
<substitute key="legend" value="ASCAT"/>
|
||||
<substitute key="svg" value="ascatPlotDesign.svg"/>
|
||||
<substitute key="plugin" value="bufrascat"/>
|
||||
<substitute key="posOffset" value="2650"/>
|
||||
<substitute key="negOffset" value="2650"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="SSM/I Point Data">
|
||||
<contribute xsi:type="titleItem"
|
||||
titleText="------ SSM/I Data ------" id="SSMIDataLine"/>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIWindPlot.xml"
|
||||
menuText="SSM/I Wind Speeds" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiWindPlotDesign.svg"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIPlot.xml"
|
||||
menuText="SSM/I Precip. Water" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiPWPlotDesign.svg"/>
|
||||
<substitute key="legend" value="SSM/I Precipitable Water (kg/m**2)"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIPlot.xml"
|
||||
menuText="SSM/I Sea Temperature" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiSTPlotDesign.svg"/>
|
||||
<substitute key="legend" value="SSM/I Sea Temperature (C)"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SSMIPlot.xml"
|
||||
menuText="SSM/I VIL" id="SSMIDataLine">
|
||||
<substitute key="svg" value="ssmiVILPlotDesign.svg"/>
|
||||
<substitute key="legend" value="SSM/I Vert. Integ. Water (kg/(m**2))"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SoundingAvailability.xml"
|
||||
menuText="GOES Sounding Availability" id="goesSoundingAvailability">
|
||||
<substitute key="pluginName" value="goessounding"/>
|
||||
<substitute key="plotSource" value="GOES Sounding Availability"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SoundingAvailability.xml"
|
||||
menuText="POES Sounding Availability" id="poesSoundingAvailability">
|
||||
<substitute key="pluginName" value="poessounding"/>
|
||||
<substitute key="plotSource" value="POES Sounding Availability"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -93,4 +93,17 @@
|
|||
<substitute key="entity" value="Miscellaneous"/>
|
||||
<substitute key="colormap" value="Sat/Precip Water/Percent of Normal TPW"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="MySeparatorId"/>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SoundingAvailability.xml"
|
||||
menuText="GOES Sounding Availability" id="goesSoundingAvailability">
|
||||
<substitute key="pluginName" value="goessounding"/>
|
||||
<substitute key="plotSource" value="GOES Sounding Availability"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SoundingAvailability.xml"
|
||||
menuText="POES Sounding Availability" id="poesSoundingAvailability">
|
||||
<substitute key="pluginName" value="poessounding"/>
|
||||
<substitute key="plotSource" value="POES Sounding Availability"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
</menuTemplate>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
<contribute xsi:type="subMenu" menuText="Sounder Imagery">
|
||||
|
||||
<contribute xsi:type="titleItem" titleText="------ Uniwisc Sounder Imagery ------" id="SounderLine"/>
|
||||
<contribute xsi:type="satBundleItem" file="bundles/DefaultSatellite.xml"
|
||||
menuText="Ozone" id="GOES-Sounder-Ozone">
|
||||
<substitute key="element" value="Sounder Based Total Column Ozone"/>
|
||||
|
@ -35,17 +34,4 @@
|
|||
<substitute key="colormap" value="Sat/IR/IR WV"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="MySeparatorId"/>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SoundingAvailability.xml"
|
||||
menuText="GOES Sounding Availability" id="goesSoundingAvailability">
|
||||
<substitute key="pluginName" value="goessounding"/>
|
||||
<substitute key="plotSource" value="GOES Sounding Availability"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/SoundingAvailability.xml"
|
||||
menuText="POES Sounding Availability" id="poesSoundingAvailability">
|
||||
<substitute key="pluginName" value="poessounding"/>
|
||||
<substitute key="plotSource" value="POES Sounding Availability"/>
|
||||
<substitute key="offset" value="1800"/>
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -72,4 +72,18 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.dataplugin.npp.crimss"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.plugin.npp.crimss"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
Loading…
Add table
Reference in a new issue