Package ucar.visad.display
Class StationModelDisplayable
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.StationModelDisplayable
- Direct Known Subclasses:
GridValueDisplayable
,StationLocationDisplayable
Class for displaying a station (layout) model plot
- Author:
- IDV Development Team
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
-
Field Summary
FieldsFields inherited from class ucar.visad.display.DisplayableData
LINE_WIDTH, MANIPULABLE, renderer, VISIBLE
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault constructor;Construct a StationModelDisplayable with the specified nameStationModelDisplayable
(String name, JythonManager jythonManager) Construct a StationModelDisplayable with the specified nameStationModelDisplayable
(String name, StationModel stationModel) Construct a StationModelDisplayable using the specified model and name.StationModelDisplayable
(String name, StationModel stationModel, JythonManager jythonManager) Construct a StationModelDisplayable using the specified model and name.Construct a StationModelDisplayable using the specified model.StationModelDisplayable
(StationModel model, JythonManager jythonManager) Construct a StationModelDisplayable using the specified model.protected
Clone constructor to create another instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns a clone of this instance suitable for another VisAD display.protected void
destroy()
Called when the displayable is removed from a display mastergetColor()
Get the default colorboolean
Get the RotateShapes property.float
getScale()
Get the scale of the ShapeControl.boolean
Get the ShouldUseAltitude property.Get the station model used by this displayable.boolean
Returns whether this Displayable has a valid range (i.e., lowSelectedRange and highSelectedRange are both not NaN'svoid
Set the colorvoid
setRangeForSelect
(double low, double hi) Set the upper and lower limit of the range values associated with a color table.void
setRotateShapes
(boolean value) Set the RotateShapes property.void
setScale
(float newScale) Set the scale of the ShapeControl.void
setSelectedRange
(double low, double hi) Set selected range with the range for selectvoid
setShouldUseAltitude
(boolean value) Set the ShouldUseAltitude property.void
setStationData
(FieldImpl stationData) Set the station data to display using the StationModel.void
setStationModel
(StationModel model) Set the station ob model for this objectvoid
setStationModel
(StationModel model, boolean update) Set the station ob model for this objectvoid
toFront()
Implement toFrontboolean
writeKmzFile
(File f, FieldImpl data, String name, int kmzIconWidth, int kmzIconHeight, Color bgColor) Write the station display into a kmz fileMethods inherited from class ucar.visad.display.DisplayableData
addAction, dataChange, getActive, getAnimationSet, getData, getDataRenderer, getLineWidth, getName, getPointSize, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setLineWidth, setManipulable, setPickable, setPointMode, setPointSize, setUseFastRendering, setVisible, showme, toString
Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setUseTimesInAnimation
-
Field Details
-
OFFSET_SCALE
public static final float OFFSET_SCALEScale for offset- See Also:
-
-
Constructor Details
-
StationModelDisplayable
Default constructor;- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
StationModelDisplayable
Construct a StationModelDisplayable with the specified name- Parameters:
name
- name of displayable and StationModel- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
StationModelDisplayable
public StationModelDisplayable(String name, JythonManager jythonManager) throws VisADException, RemoteException Construct a StationModelDisplayable with the specified name- Parameters:
name
- name of displayable and StationModeljythonManager
- The JythonManager for evaluating embedded expressions- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
StationModelDisplayable
Construct a StationModelDisplayable using the specified model.- Parameters:
model
- StationModel to use for data depiction- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
StationModelDisplayable
public StationModelDisplayable(StationModel model, JythonManager jythonManager) throws VisADException, RemoteException Construct a StationModelDisplayable using the specified model.- Parameters:
model
- StationModel to use for data depictionjythonManager
- The JythonManager for evaluating embedded expressions- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
StationModelDisplayable
public StationModelDisplayable(String name, StationModel stationModel) throws VisADException, RemoteException Construct a StationModelDisplayable using the specified model and name.- Parameters:
name
- name of for this displayable data referencestationModel
- StationModel to use for data depiction- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
StationModelDisplayable
public StationModelDisplayable(String name, StationModel stationModel, JythonManager jythonManager) throws VisADException, RemoteException Construct a StationModelDisplayable using the specified model and name.- Parameters:
name
- name of for this displayable data referencestationModel
- StationModel to use for data depictionjythonManager
- The JythonManager for evaluating embedded expressions- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
StationModelDisplayable
protected StationModelDisplayable(StationModelDisplayable that) throws VisADException, RemoteException Clone constructor to create another instance.- Parameters:
that
- object to clone from.- Throws:
RemoteException
- a remote errorVisADException
- a VisAD error
-
-
Method Details
-
setStationData
Set the station data to display using the StationModel.- Parameters:
stationData
- Field of station observations.- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
setColor
Set the color- Overrides:
setColor
in classDisplayable
- Parameters:
c
- the new color- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
getColor
Get the default color- Returns:
- the color
-
toFront
Implement toFront- Overrides:
toFront
in classDisplayable
- Throws:
VisADException
- unable to create specified VisAD objectsRemoteException
- unable to create specified remote objects
-
cloneForDisplay
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.- Overrides:
cloneForDisplay
in classDisplayableData
- Returns:
- A semi-deep clone of this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setStationModel
Set the station ob model for this object- Parameters:
model
- StationModel to use- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setStationModel
public void setStationModel(StationModel model, boolean update) throws VisADException, RemoteException Set the station ob model for this object- Parameters:
model
- StationModel to useupdate
- update data using new model- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getStationModel
Get the station model used by this displayable.- Returns:
- the station model
-
writeKmzFile
public boolean writeKmzFile(File f, FieldImpl data, String name, int kmzIconWidth, int kmzIconHeight, Color bgColor) throws Exception Write the station display into a kmz file- Parameters:
f
- The filedata
- The dataname
- Name for kmlkmzIconWidth
- icon widthkmzIconHeight
- icon heightbgColor
- background color of icon- Returns:
- success
- Throws:
Exception
- on badness
-
destroy
Called when the displayable is removed from a display master- Overrides:
destroy
in classDisplayableData
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setScale
Set the scale of the ShapeControl. Usually done to set the initial scale.- Parameters:
newScale
- scale to use.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getScale
public float getScale()Get the scale of the ShapeControl.- Returns:
- current scale;
-
setShouldUseAltitude
Set the ShouldUseAltitude property.- Parameters:
value
- The new value for ShouldUseAltitude- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getShouldUseAltitude
public boolean getShouldUseAltitude()Get the ShouldUseAltitude property.- Returns:
- The ShouldUseAltitude
-
setSelectedRange
Set selected range with the range for select- Overrides:
setSelectedRange
in classDisplayable
- Parameters:
low
- low select valuehi
- hi select value- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setRangeForSelect
Set the upper and lower limit of the range values associated with a color table.- Parameters:
low
- the minimun valuehi
- the maximum value- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
hasSelectedRange
public boolean hasSelectedRange()Returns whether this Displayable has a valid range (i.e., lowSelectedRange and highSelectedRange are both not NaN's- Returns:
- true if range has been set
-
setRotateShapes
public void setRotateShapes(boolean value) Set the RotateShapes property.- Parameters:
value
- The new value for RotateShapes
-
getRotateShapes
public boolean getRotateShapes()Get the RotateShapes property.- Returns:
- The RotateShapes
-