Package ucar.visad.display
Class StationLocationDisplayable
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.StationModelDisplayable
ucar.visad.display.StationLocationDisplayable
Provides support for display of station locations. Each location can
have a station identifier (e.g., id, name, lat, lon) and/or a location
marker (e.g., plus, circle, star). What gets displayed is determined
by the parameters set through the
setDisplayState(int, boolean, int, boolean)
and associated
methods.- Version:
- $Revision: 1.22 $
- Author:
- IDV development team.
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The identifier for a station elevation (units of meters)static final int
The identifier for a station elevation (units of feet)static final int
The identifier for a station identifierstatic final int
The identifier for a station latitudestatic final int
The identifier for a station latitude/longitudestatic final int
The identifier for a station longitudestatic final int
The identifier for a station namestatic final String[]
Array of names of station information identifiersstatic final int[]
Array of station information identifiersstatic final int
The identifier for a circle station location markerstatic final int
The identifier for a diamond station location markerstatic final int
The identifier for a filled circle station location markerstatic final int
The identifier for a filled diamond station location markerstatic final int
The identifier for a filled square station location markerstatic final int
The identifier for a filled start station location markerstatic final int
The identifier for a filled triangle station location markerstatic final String[]
Array of names of station markersstatic final int
The identifier for no station location markerstatic final int
The identifier for a plus station location markerstatic final int
The identifier for a square station location markerstatic final int
The identifier for a star station location markerstatic final int
The identifier for a triangle station location markerstatic final int[]
Array of station location markersFields inherited from class ucar.visad.display.StationModelDisplayable
OFFSET_SCALE
Fields 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
ConstructorsConstructorDescriptionConstructs an instance with the supplied reference name.StationLocationDisplayable
(String name, int symbolType, boolean showSymbol, int idType, boolean showId) Constructs an instance with the supplied parameters.StationLocationDisplayable
(String name, int symbolType, boolean showSymbol, int idType, boolean showId, JythonManager jythonManager) Constructs an instance with the supplied parameters.StationLocationDisplayable
(String name, JythonManager jythonManager) Constructs an instance with the supplied parameters.StationLocationDisplayable
(String name, StationModel view) Constructs an instance with the supplied reference name and station model view. -
Method Summary
Modifier and TypeMethodDescriptionReturns a clone of this instance suitable for another VisAD display.protected void
destroy()
Destroy this instanceint
Get the id type.boolean
Get whether or not the id should be displayed.boolean
Get whether or not the station marker symbol should be displayed.int
Get the symbol type.void
Set the color of the model.void
setDisplayState
(int symbolType, boolean showSymbol, int idType, boolean showId) Sets the parameters used for generating a station model.void
setIdType
(int value) Set the id type that is used for the station display.void
setShowId
(boolean value) Set whether the station id should be shown in the station model view.void
setShowSymbol
(boolean value) Set whether the station marker symbol should be shown in the station model view.void
setStations
(List stations) Set the list stations to be displayed.void
setStations
(NamedLocation[] stations) Set the stations to be displayed.void
setSymbolType
(int value) Set the symbol type (The index into WeatherSymbols.getMisc) that is used for the station display.void
Update yourselfMethods inherited from class ucar.visad.display.StationModelDisplayable
getColor, getRotateShapes, getScale, getShouldUseAltitude, getStationModel, hasSelectedRange, setRangeForSelect, setRotateShapes, setScale, setSelectedRange, setShouldUseAltitude, setStationData, setStationModel, setStationModel, toFront, writeKmzFile
Methods 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
-
ID_ID
public static final int ID_IDThe identifier for a station identifier- See Also:
-
ID_NAME
public static final int ID_NAMEThe identifier for a station name- See Also:
-
ID_LAT
public static final int ID_LATThe identifier for a station latitude- See Also:
-
ID_LON
public static final int ID_LONThe identifier for a station longitude- See Also:
-
ID_LATLON
public static final int ID_LATLONThe identifier for a station latitude/longitude- See Also:
-
ID_ELEVATION
public static final int ID_ELEVATIONThe identifier for a station elevation (units of meters)- See Also:
-
ID_ELEVATION_FT
public static final int ID_ELEVATION_FTThe identifier for a station elevation (units of feet)- See Also:
-
IDS
public static final int[] IDSArray of station information identifiers -
ID_NAMES
Array of names of station information identifiers -
SYMBOL_NONE
public static final int SYMBOL_NONEThe identifier for no station location marker- See Also:
-
SYMBOL_SQUARE
public static final int SYMBOL_SQUAREThe identifier for a square station location marker- See Also:
-
SYMBOL_FSQUARE
public static final int SYMBOL_FSQUAREThe identifier for a filled square station location marker- See Also:
-
SYMBOL_CIRCLE
public static final int SYMBOL_CIRCLEThe identifier for a circle station location marker- See Also:
-
SYMBOL_FCIRCLE
public static final int SYMBOL_FCIRCLEThe identifier for a filled circle station location marker- See Also:
-
SYMBOL_TRIANGLE
public static final int SYMBOL_TRIANGLEThe identifier for a triangle station location marker- See Also:
-
SYMBOL_FTRIANGLE
public static final int SYMBOL_FTRIANGLEThe identifier for a filled triangle station location marker- See Also:
-
SYMBOL_DIAMOND
public static final int SYMBOL_DIAMONDThe identifier for a diamond station location marker- See Also:
-
SYMBOL_FDIAMOND
public static final int SYMBOL_FDIAMONDThe identifier for a filled diamond station location marker- See Also:
-
SYMBOL_STAR
public static final int SYMBOL_STARThe identifier for a star station location marker- See Also:
-
SYMBOL_FSTAR
public static final int SYMBOL_FSTARThe identifier for a filled start station location marker- See Also:
-
SYMBOL_PLUS
public static final int SYMBOL_PLUSThe identifier for a plus station location marker- See Also:
-
SYMBOLS
public static final int[] SYMBOLSArray of station location markers -
SYMBOL_NAMES
Array of names of station markers
-
-
Constructor Details
-
StationLocationDisplayable
Constructs an instance with the supplied reference name. Uses default station marker and station identifier.- Parameters:
name
- reference name- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
StationLocationDisplayable
public StationLocationDisplayable(String name, int symbolType, boolean showSymbol, int idType, boolean showId) throws VisADException, RemoteException Constructs an instance with the supplied parameters.- Parameters:
name
- reference namesymbolType
- type of symbol (e.g., SYMBOL_CIRCLE)showSymbol
- true if symbol should be shown on plotidType
- type of station identifier (e.g., ID_ID)showId
- true if ID should be shown on plot- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
StationLocationDisplayable
public StationLocationDisplayable(String name, int symbolType, boolean showSymbol, int idType, boolean showId, JythonManager jythonManager) throws VisADException, RemoteException Constructs an instance with the supplied parameters.- Parameters:
name
- reference namesymbolType
- type of symbol (e.g., SYMBOL_CIRCLE)showSymbol
- true if symbol should be shown on plotidType
- type of station identifier (e.g., ID_ID)showId
- true if ID should be shown on plotjythonManager
- Used for evaluating embedded expressions- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
StationLocationDisplayable
public StationLocationDisplayable(String name, JythonManager jythonManager) throws VisADException, RemoteException Constructs an instance with the supplied parameters.- Parameters:
name
- The namejythonManager
- Used for evaluating embedded expressions- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
StationLocationDisplayable
public StationLocationDisplayable(String name, StationModel view) throws VisADException, RemoteException Constructs an instance with the supplied reference name and station model view.- Parameters:
name
- reference nameview
- station model view- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
-
Method Details
-
destroy
Destroy this instance- Overrides:
destroy
in classStationModelDisplayable
- Throws:
RemoteException
- Java RMI ExceptionVisADException
- VisAD Exception
-
setDisplayState
public void setDisplayState(int symbolType, boolean showSymbol, int idType, boolean showId) throws VisADException, RemoteException Sets the parameters used for generating a station model.- Parameters:
symbolType
- type of symbol (e.g., SYMBOL_CIRCLE)showSymbol
- true if symbol should be shown on plotidType
- type of station identifier (e.g., ID_ID)showId
- true if ID should be shown on plot- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
setColor
Set the color of the model.- Overrides:
setColor
in classStationModelDisplayable
- Parameters:
c
- color to use for all components in the model- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
updateDisplayable
Update yourself- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setSymbolType
Set the symbol type (The index into WeatherSymbols.getMisc) that is used for the station display.- Parameters:
value
- set the value for the symbol type (e.g., SYMBOL_SQUARE)- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
getSymbolType
public int getSymbolType()Get the symbol type.- Returns:
- the symbol type being used (e.g., SYMBOL_FSQUARE);
-
setIdType
Set the id type that is used for the station display.- Parameters:
value
- set the value for the id type (e.g., ID_NAME)- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
getIdType
public int getIdType()Get the id type.- Returns:
- the id type being used (e.g., ID_LAT);
-
setShowId
Set whether the station id should be shown in the station model view.- Parameters:
value
- true to show the id- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object- See Also:
-
getShowId
public boolean getShowId()Get whether or not the id should be displayed.- Returns:
- true if it should be displayed.
-
setShowSymbol
Set whether the station marker symbol should be shown in the station model view.- Parameters:
value
- true to show the symbol- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object- See Also:
-
getShowSymbol
public boolean getShowSymbol()Get whether or not the station marker symbol should be displayed.- Returns:
- true if it should be displayed.
-
setStations
Set the list stations to be displayed.- Parameters:
stations
- List of NamedStationImpls- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
setStations
Set the stations to be displayed.- Parameters:
stations
- array of stations.- Throws:
VisADException
- couldn't create the necessary VisAD objectRemoteException
- couldn't create the remote object
-
cloneForDisplay
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.- Overrides:
cloneForDisplay
in classStationModelDisplayable
- Returns:
- A semi-deep clone of this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-