|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.idv.control.DisplayControlBase
ucar.unidata.idv.control.DisplayControlImpl
ucar.unidata.idv.control.GridDisplayControl
ucar.unidata.idv.control.PlanViewControl
public abstract class PlanViewControl
Class to handle all kinds of PlanViews. A plan view is a horizontal slice at a level.
| Nested Class Summary | |
|---|---|
class |
PlanViewControl.VerticalRangeWidget
A widget for the control window for setting the vertical range properties |
| Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl |
|---|
DisplayControlImpl.SideLegendLabel |
| Field Summary | |
|---|---|
protected Object |
currentLevel
current level |
protected Object[] |
currentLevels
list of current levels |
protected FieldImpl |
currentSlice
current slice |
protected DataChoice |
datachoice
data choice for the data |
protected boolean |
haveEnsemble
flag for ensembles |
protected JLabel |
levelReadout
level readout label |
static String |
MACRO_LEVEL
Macro for the short parameter name for the label |
static String |
SHARE_LEVEL
property for sharing levels |
| Fields inherited from class ucar.unidata.idv.control.GridDisplayControl |
|---|
CMD_CONTOURDIALOG, CMD_SETLEVELS, gridDataInstance, INITIAL_PROBE_EARTHLOCATION, log_, settingLevel |
| Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl |
|---|
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, contourWidget, controlContext, ctw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayListUsesColor, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, noteTextArea, noteWrapper, paramName, requestProperties, selectRangeWidget, settingVisibility, sharables, showNoteText, skipSlider, version, viewManagers, ZFUDGE |
| Fields inherited from interface ucar.unidata.idv.DisplayControl |
|---|
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, RASTERMODE_SHOWALL, RASTERMODE_SHOWNONRASTER, RASTERMODE_SHOWRASTER, SIDE_LEGEND |
| Constructor Summary | |
|---|---|
PlanViewControl()
Cstr; does nothing. |
|
| Method Summary | |
|---|---|
protected void |
addDisplaySettings(DisplaySettingsDialog dsd)
Add DisplaySettings appropriate for this display |
protected void |
addLabelMacros(String template,
List patterns,
List values)
Add any macro name/value pairs. |
protected void |
addParameterTopographyMap()
Add a topography map for the parameter |
protected void |
addTopographyMap()
Wrapper around GridDisplayControl.addTopographyMap(int) to allow subclasses
to set their own index. |
void |
addToRangeMenu(RangeWidget rw,
List items)
Add an entry into the range menu |
protected void |
applySkipFactor()
Use the value of the skip factor to subset the data. |
protected void |
applySmoothing()
Use the value of the smoothing type and weight to subset the data. |
boolean |
canExportData()
Can this display control write out data. |
protected boolean |
checkFlag(int f)
Test if the given flag is set in the attrbiuteFlags |
protected abstract DisplayableData |
createPlanDisplay()
Method for creating the DisplayableData object
that is the main depiction for the data controlled by this
PlanViewControl; implemented by each subclass. |
protected void |
displayUnitChanged(Unit oldUnit,
Unit newUnit)
A hook that is called when the display unit is changed. |
Container |
doMakeContents()
Make some Plan view controls for the UI. |
void |
doRemove()
Remove this control |
protected String |
formatLevel(Object level)
Format the level for labelling. |
protected int |
getColorRangeIndex()
Returns the index to use in the GridDataInstance array of ranges for color ranges. |
void |
getControlWidgets(List<ControlWidget> controlWidgets)
Add in any special control widgets to the current list of widgets. |
protected FieldImpl |
getCurrentSlice()
Get the current slice |
protected Data |
getCursorReadoutData()
Get the cursor readout data |
protected List |
getCursorReadoutInner(EarthLocation el,
Real animationValue,
int animationStep,
List<ReadoutInfo> samples)
Get the cursor data |
protected String |
getDataProjectionLabel()
Get the Data projection label |
protected Data |
getDisplayedData()
Get the DisplayedData |
protected void |
getEditMenuItems(List items,
boolean forMenuBar)
Overwrite the base class method to add a Levels menu to the edit menu |
GridDisplayable |
getGridDisplayable()
Return the Displayable of the Plan View as a
GridDisplayable. |
boolean |
getIgnoreVerticalDimension()
get the Ignore Vertical Dimension property |
void |
getLegendLabels(List labels,
int legendType)
Append any label information to the list of labels. |
Object |
getLevel()
Return active level value. |
protected Range |
getLevelColorRange()
Get the range for the current slice. |
String |
getLevelsLabel()
Get the label for the levels box. |
protected void |
getMacroNames(List names,
List labels)
Add any macro name/label pairs |
boolean |
getMultipleIsTopography()
Get the multiple is topography property. |
boolean |
getParameterIsTopography()
Get the parameter is topography property. |
DisplayableData |
getPlanDisplay()
Return the displayable of the Plan View as a DisplayableData. |
int |
getPolygonMode()
Return the type of depiction for this display |
protected JComboBox |
getPolyModeComboBox()
Create a jcombobox for setting the polygon mode. |
protected FieldImpl |
getSliceForDisplay(FieldImpl slice)
Get the slice for the display |
Range |
getVerticalRange()
Get the vertical range |
boolean |
haveLevels()
Determine whether the data in this PlanViewControl
has levels or not. |
protected boolean |
haveMultipleFields()
Return whether the Data held by this display control contains multiple fields (e.g., for the isosurface colored by another parameter |
boolean |
init(DataChoice dataChoice)
Called to make this kind of Display Control; also calls code to made the Displayable. |
void |
initDone()
What to do when you are done. |
void |
loadDataAtLevel(Object level)
Load data at the level specified. |
void |
projectionChanged()
Method to call if projection changes. |
void |
propertyChange(PropertyChangeEvent evt)
Handle property change |
void |
receiveShareData(Sharable from,
Object dataId,
Object[] data)
Method called by other classes that share the selector. |
protected void |
setCurrentSlice(FieldImpl slice)
Set the current slice |
protected boolean |
setData(DataChoice dataChoice)
Called to initialize this control from the given dataChoice; sets levels controls to match data; make data slice at first level; set display's color table and display units. |
void |
setDataSelectionLevel(Object level)
Set the level in the data selection |
void |
setIgnoreVerticalDimension(boolean v)
Set the ignore Vertical Dimension property |
void |
setLevel(Object pl)
Set the active level. |
protected void |
setLevelFromUser(Object pl)
Set the level from the user |
void |
setLevelReadoutLabel(String text)
Set the text for the level readout in the control window. |
void |
setLevels(Object[] levels)
If there are, or are not, some levels in the data, set the controls accordingly. |
void |
setMultipleIsTopography(boolean v)
Set the other is topography property. |
void |
setParameterIsTopography(boolean v)
Set the parameter is topography property. |
void |
setPointSize(float value)
Set the point size |
void |
setPolygonMode(int v)
Set the type of depiction (solid, line, mesh) for this display |
void |
setSettingsLevel(Object level)
Set the active level. |
void |
setVerticalRange(Range vertRange)
Set the range on the parameter topography ScalarMap |
protected boolean |
shouldShowLevelWidget()
This allows for derived classes to turn this off. |
protected boolean |
shouldShowZSelector()
This allows for derived classes to turn this off. |
protected boolean |
shouldUseZPosition()
Determine if the display and gui should have a z position. |
| Methods inherited from class ucar.unidata.idv.control.DisplayControlBase |
|---|
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getLabeledReal, getLevelReal, getScreenCenter, getSelectedStation, getTmpProperty, isLeftButtonDown, logException, logException, makeEarthLocation, putTmpProperty, removeTmpProperty, screenToBox, screenToBox, screenToEarth, setStations, setStations, toBox, toEarth, userErrorMessage, userMessage |
| Methods inherited from class ucar.unidata.collab.SharableImpl |
|---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ucar.unidata.idv.DisplayControl |
|---|
getTmpProperty, putTmpProperty, removeTmpProperty |
| Methods inherited from interface ucar.unidata.collab.Sharable |
|---|
getReceiveShareTime, getShareGroup, getSharing, getUniqueId, setReceiveShareTime |
| Field Detail |
|---|
public static final String MACRO_LEVEL
public static final String SHARE_LEVEL
protected Object[] currentLevels
protected JLabel levelReadout
protected FieldImpl currentSlice
protected Object currentLevel
protected DataChoice datachoice
protected boolean haveEnsemble
| Constructor Detail |
|---|
public PlanViewControl()
| Method Detail |
|---|
protected Data getCursorReadoutData()
throws Exception
getCursorReadoutData in class GridDisplayControlException - problem getting data
protected void setCurrentSlice(FieldImpl slice)
throws Exception
slice - the slice
Exception - problem setting the slice
protected FieldImpl getCurrentSlice()
throws Exception
Exception - problem getting the data
protected List getCursorReadoutInner(EarthLocation el,
Real animationValue,
int animationStep,
List<ReadoutInfo> samples)
throws Exception
getCursorReadoutInner in class GridDisplayControlel - earth locationanimationValue - the animation valueanimationStep - the animation stepsamples - the list of samples
Exception - problem getting the dataprotected String getDataProjectionLabel()
getDataProjectionLabel in class DisplayControlImplprotected void addDisplaySettings(DisplaySettingsDialog dsd)
addDisplaySettings in class DisplayControlImpldsd - the dialog to add to
public void addToRangeMenu(RangeWidget rw,
List items)
addToRangeMenu in class DisplayControlImplrw - The widget that manages the range dialogitems - List of menu itemsprotected Range getLevelColorRange()
public boolean init(DataChoice dataChoice)
throws VisADException,
RemoteException
init in class DisplayControlImpldataChoice - the DataChoice of the moment.
RemoteException - Java RMI error
VisADException - VisAD Errorpublic void initDone()
initDone in class DisplayControlImplprotected JComboBox getPolyModeComboBox()
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpropertyChange in class DisplayControlImplevt - The event
public void doRemove()
throws RemoteException,
VisADException
doRemove in interface DisplayControldoRemove in class DisplayControlImplRemoteException - Java RMI problem
VisADException - VisAD data problemprotected boolean haveMultipleFields()
haveMultipleFields in class GridDisplayControlprotected int getColorRangeIndex()
getColorRangeIndex in class GridDisplayControl
protected boolean setData(DataChoice dataChoice)
throws VisADException,
RemoteException
setData in class DisplayControlImpldataChoice - choice that describes the data to be loaded.
RemoteException - Java RMI error
VisADException - VisAD Error
protected void addTopographyMap()
throws VisADException,
RemoteException
GridDisplayControl.addTopographyMap(int) to allow subclasses
to set their own index.
RemoteException - Java RMI error
VisADException - VisAD error
protected void addParameterTopographyMap()
throws VisADException,
RemoteException
RemoteException - Java RMI problem
VisADException - Unable to set the ScalarMappublic void setVerticalRange(Range vertRange)
vertRange - the vertical rangepublic Range getVerticalRange()
public boolean haveLevels()
PlanViewControl
has levels or not.
public void setLevels(Object[] levels)
levels - array of levels
protected void getEditMenuItems(List items,
boolean forMenuBar)
getEditMenuItems in class DisplayControlImplitems - Menu items to add toforMenuBar - Is this edit menu for the main menu barpublic DisplayableData getPlanDisplay()
DisplayableData that is being used for the
main depiction of this PlanDisplaypublic GridDisplayable getGridDisplayable()
Displayable of the Plan View as a
GridDisplayable.
Displayable cast to a GridDisplaypublic void setPointSize(float value)
setPointSize in class DisplayControlImplvalue - the size
protected abstract DisplayableData createPlanDisplay()
throws VisADException,
RemoteException
DisplayableData object
that is the main depiction for the data controlled by this
PlanViewControl; implemented by each subclass.
DisplayableData for the data depiction.
RemoteException - Java RMI error
VisADException - VisAD Errorpublic void projectionChanged()
projectionChanged in interface DisplayControlprojectionChanged in class DisplayControlImplpublic Object getLevel()
public void setLevel(Object pl)
setLevel in class GridDisplayControlpl - present level.public void setSettingsLevel(Object level)
level - present level.public void setDataSelectionLevel(Object level)
level - The level
protected void setLevelFromUser(Object pl)
throws VisADException,
RemoteException
setLevelFromUser in class GridDisplayControlpl - level
RemoteException - Java RMI error
VisADException - VisAD Error
public void loadDataAtLevel(Object level)
throws VisADException,
RemoteException
level - level to load at
VisADException - illegal level or other VisAD error
RemoteException - RMI error
protected FieldImpl getSliceForDisplay(FieldImpl slice)
throws VisADException
slice - slice to use
VisADException - problem subsetting the slice
protected void applySmoothing()
throws VisADException,
RemoteException
applySmoothing in class DisplayControlImplRemoteException - Java RMI problem
VisADException - VisAD problemprotected boolean checkFlag(int f)
checkFlag in class DisplayControlImplf - The flag to check
protected void getMacroNames(List names,
List labels)
getMacroNames in class DisplayControlImplnames - List of macro nameslabels - List of macro labels
protected void addLabelMacros(String template,
List patterns,
List values)
addLabelMacros in class DisplayControlImpltemplate - templatepatterns - The macro namesvalues - The macro values
public void getLegendLabels(List labels,
int legendType)
getLegendLabels in class DisplayControlImpllabels - in/out list of labelslegendType - The type of legend, BOTTOM_LEGEND or SIDE_LEGENDprotected String formatLevel(Object level)
level - level to format
public void receiveShareData(Sharable from,
Object dataId,
Object[] data)
receiveShareData in interface SharablereceiveShareData in class DisplayControlImplfrom - other class.dataId - type of sharingdata - Array of data being shared. In this case, the first
(and only?) object in the array is the levelpublic Container doMakeContents()
doMakeContents in class DisplayControlImpl
public void getControlWidgets(List<ControlWidget> controlWidgets)
throws VisADException,
RemoteException
getControlWidgets in class DisplayControlImplcontrolWidgets - list of control widgets
VisADException - VisAD error
RemoteException - RMI error
protected void displayUnitChanged(Unit oldUnit,
Unit newUnit)
displayUnitChanged in class DisplayControlImploldUnit - The old color unitnewUnit - The new color unitprotected boolean shouldShowLevelWidget()
protected boolean shouldShowZSelector()
protected boolean shouldUseZPosition()
public void setLevelReadoutLabel(String text)
text - text for the level readoutpublic void setMultipleIsTopography(boolean v)
v - true if second parameter is topographypublic boolean getMultipleIsTopography()
public void setParameterIsTopography(boolean v)
v - true if second parameter is topographypublic boolean getParameterIsTopography()
public void setIgnoreVerticalDimension(boolean v)
v - true if vertical dimension should be ignoredpublic boolean getIgnoreVerticalDimension()
public String getLevelsLabel()
public boolean canExportData()
canExportData in class DisplayControlImpl
protected Data getDisplayedData()
throws VisADException,
RemoteException
getDisplayedData in class DisplayControlImplRemoteException - problem reading remote data
VisADException - problem gettting dataprotected void applySkipFactor()
applySkipFactor in class DisplayControlImplpublic void setPolygonMode(int v)
v - polygon mode. Used by XML persistence.public int getPolygonMode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||