working version volumebrowser dropdown menu for plot type

This commit is contained in:
Michael James 2016-10-04 15:00:25 -06:00
parent da1734092e
commit a28f10bf79
9 changed files with 544 additions and 10 deletions

View file

@ -574,6 +574,11 @@
</reference>
</visibleWhen>
</command>
<command
commandId="SetBrowserViewType"
label="Plot Type"
style="pulldown">
</command>
</toolbar>
</menuContribution>
@ -824,6 +829,30 @@
id="com.raytheon.uf.viz.d2d.ui.densityPopulator">
</dynamic>
</menuContribution>
<menuContribution
allPopups="false"
locationURI="menu:SetBrowserViewType">
<command
commandId="com.raytheon.viz.volumebrowser.crossSection"
label="Cross Section">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.timeSeries"
label="Time Series">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.timeHeight"
label="Time Height">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.varHeight"
label="Var vs. Height">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.sounding"
label="Model Soundings">
</command>
</menuContribution>
</extension>
@ -1505,6 +1534,10 @@
categoryId="com.raytheon.uf.viz.d2d.ui"
description="Toggles a blended resource"
name="Toggle Layer"/>
<command
id="SetBrowserViewType"
name="Set Volume Browser View Type">
</command>
</extension>
<extension
point="com.raytheon.viz.ui.perspectiveManager">

View file

@ -28,13 +28,30 @@
id="com.raytheon.viz.volumebrowser.volumeBrowser"
name="Volume Browser">
</command>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="com.raytheon.viz.volumebrowser.volumeBrowserRef"
name="Volume Browser">
</command>
<command
id="com.raytheon.viz.volumebrowser.crossSection"
name="Cross Section">
</command>
<command
id="com.raytheon.viz.volumebrowser.timeHeight"
name="Time Height">
</command>
<command
id="com.raytheon.viz.volumebrowser.timeSeries"
name="Time Series">
</command>
<command
id="com.raytheon.viz.volumebrowser.varHeight"
name="Var vs. Height">
</command>
<command
id="com.raytheon.viz.volumebrowser.sounding"
name="Model Soundings">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
@ -42,6 +59,26 @@
class="com.raytheon.viz.volumebrowser.vbui.VolumeBrowserAction"
commandId="com.raytheon.viz.volumebrowser.volumeBrowserRef">
</handler>
<handler
class="com.raytheon.viz.volumebrowser.vbui.CrossSectionAction"
commandId="com.raytheon.viz.volumebrowser.crossSection">
</handler>
<handler
class="com.raytheon.viz.volumebrowser.vbui.TimeHeightAction"
commandId="com.raytheon.viz.volumebrowser.timeHeight">
</handler>
<handler
class="com.raytheon.viz.volumebrowser.vbui.VarHeightAction"
commandId="com.raytheon.viz.volumebrowser.varHeight">
</handler>
<handler
class="com.raytheon.viz.volumebrowser.vbui.TimeSeriesAction"
commandId="com.raytheon.viz.volumebrowser.timeSeries">
</handler>
<handler
class="com.raytheon.viz.volumebrowser.vbui.SoundingAction"
commandId="com.raytheon.viz.volumebrowser.sounding">
</handler>
</extension>
<extension point="com.raytheon.uf.viz.core.alterBundle">
<alterBundle class="com.raytheon.viz.volumebrowser.ToolsAlterBundleContributor"/>
@ -74,6 +111,26 @@
commandId="com.raytheon.viz.volumebrowser.volumeBrowserRef"
label="Volume Browser">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.crossSection"
label="Cross Section">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.timeSeries"
label="Time Series">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.timeHeight"
label="Time Height">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.varHeight"
label="Var vs. Height">
</command>
<command
commandId="com.raytheon.viz.volumebrowser.sounding"
label="Model Soundings">
</command>
<separator name="afterVB" visible="false"/>
<separator name="ensemble" visible="false"/>
<separator name="VolumeBundles" visible="true"/>

View file

@ -0,0 +1,86 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.volumebrowser.vbui;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
/**
*
* Action to bring up the Cross Section Dialog.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 9, 2009 #2161 lvenable Initial creation
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class CrossSectionAction extends VolumeBrowserAction {
/**
* Volume Browser dialog.
*/
private static VolumeBrowserDlg volumeBrowserDlg = null;
public static VolumeBrowserDlg getVolumeBrowserDlg() {
return volumeBrowserDlg;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
* .ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (volumeBrowserDlg == null) {
volumeBrowserDlg = new VolumeBrowserDlg(shell, ViewMenu.CROSSSECTION);
volumeBrowserDlg.addListener(SWT.Dispose, new Listener() {
@Override
public void handleEvent(Event event) {
volumeBrowserDlg = null;
}
});
}
volumeBrowserDlg.open();
return null;
}
}

View file

@ -0,0 +1,87 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.volumebrowser.vbui;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
/**
*
* Action to bring up the Volume Browser Dialog.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 9, 2009 #2161 lvenable Initial creation
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class SoundingAction extends AbstractHandler {
/**
* Volume Browser dialog.
*/
private static VolumeBrowserDlg volumeBrowserDlg = null;
public static VolumeBrowserDlg getVolumeBrowserDlg() {
return volumeBrowserDlg;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
* .ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (volumeBrowserDlg == null) {
volumeBrowserDlg = new VolumeBrowserDlg(shell, ViewMenu.SOUNDING);
volumeBrowserDlg.addListener(SWT.Dispose, new Listener() {
@Override
public void handleEvent(Event event) {
volumeBrowserDlg = null;
}
});
}
volumeBrowserDlg.open();
return null;
}
}

View file

@ -0,0 +1,87 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.volumebrowser.vbui;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
/**
*
* Action to bring up the Volume Browser Dialog.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 9, 2009 #2161 lvenable Initial creation
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class TimeHeightAction extends AbstractHandler {
/**
* Volume Browser dialog.
*/
private static VolumeBrowserDlg volumeBrowserDlg = null;
public static VolumeBrowserDlg getVolumeBrowserDlg() {
return volumeBrowserDlg;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
* .ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (volumeBrowserDlg == null) {
volumeBrowserDlg = new VolumeBrowserDlg(shell, ViewMenu.TIMEHEIGHT);
volumeBrowserDlg.addListener(SWT.Dispose, new Listener() {
@Override
public void handleEvent(Event event) {
volumeBrowserDlg = null;
}
});
}
volumeBrowserDlg.open();
return null;
}
}

View file

@ -0,0 +1,87 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.volumebrowser.vbui;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
/**
*
* Action to bring up the Volume Browser Dialog.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 9, 2009 #2161 lvenable Initial creation
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class TimeSeriesAction extends AbstractHandler {
/**
* Volume Browser dialog.
*/
private static VolumeBrowserDlg volumeBrowserDlg = null;
public static VolumeBrowserDlg getVolumeBrowserDlg() {
return volumeBrowserDlg;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
* .ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (volumeBrowserDlg == null) {
volumeBrowserDlg = new VolumeBrowserDlg(shell, ViewMenu.TIMESERIES);
volumeBrowserDlg.addListener(SWT.Dispose, new Listener() {
@Override
public void handleEvent(Event event) {
volumeBrowserDlg = null;
}
});
}
volumeBrowserDlg.open();
return null;
}
}

View file

@ -0,0 +1,87 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.volumebrowser.vbui;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
/**
*
* Action to bring up the Volume Browser Dialog.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 9, 2009 #2161 lvenable Initial creation
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class VarHeightAction extends AbstractHandler {
/**
* Volume Browser dialog.
*/
private static VolumeBrowserDlg volumeBrowserDlg = null;
public static VolumeBrowserDlg getVolumeBrowserDlg() {
return volumeBrowserDlg;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
* .ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (volumeBrowserDlg == null) {
volumeBrowserDlg = new VolumeBrowserDlg(shell, ViewMenu.VARVSHGT);
volumeBrowserDlg.addListener(SWT.Dispose, new Listener() {
@Override
public void handleEvent(Event event) {
volumeBrowserDlg = null;
}
});
}
volumeBrowserDlg.open();
return null;
}
}

View file

@ -28,6 +28,8 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
/**
*
* Action to bring up the Volume Browser Dialog.
@ -68,7 +70,7 @@ public class VolumeBrowserAction extends AbstractHandler {
.getShell();
if (volumeBrowserDlg == null) {
volumeBrowserDlg = new VolumeBrowserDlg(shell);
volumeBrowserDlg = new VolumeBrowserDlg(shell, ViewMenu.PLANVIEW);
volumeBrowserDlg.addListener(SWT.Dispose, new Listener() {
@Override
public void handleEvent(Event event) {

View file

@ -131,24 +131,32 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements
*/
private DataListsProdTableComp listTableComp;
public final String DIALOG_TITLE = "Volume Browser";
private SpaceTimeMenu previousSpaceTimeMenu = null;
private boolean initialized = false;
private IPointChangedListener pointChangeListener;
private ViewMenu type = null;
public ViewMenu getType() {
return type;
}
public void setType(ViewMenu type) {
this.type = type;
}
/**
* Constructor.
*
* @param parent
* Parent shell.
*/
public VolumeBrowserDlg(Shell parent) {
public VolumeBrowserDlg(Shell parent, ViewMenu viewMenu) {
super(parent, SWT.SHELL_TRIM | SWT.RESIZE, CAVE.INDEPENDENT_SHELL
| CAVE.DO_NOT_BLOCK);
setText(DIALOG_TITLE);
setType(viewMenu);
setText(viewMenu.getDisplayString());
dialogSettings = new VolumeBrowserDialogSettings();
VizGlobalsManager.addListener(VizConstants.LOADMODE_ID, this);
@ -527,8 +535,8 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements
// Create the "Settings" menu
// -------------------------------------
settingsMI = new MenuItem(menuBar, SWT.CASCADE);
settingsMI.setText(ViewMenu.PLANVIEW.displayString);
settingsMI.setData(ViewMenu.PLANVIEW);
settingsMI.setText(type.displayString);
settingsMI.setData(type);
// Create the "Settings" menu item
Menu settingsMenu = new Menu(menuBar);