ucar.visad.display
Class StationLocationDisplayable

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.DisplayableData
          extended by ucar.visad.display.StationModelDisplayable
              extended by ucar.visad.display.StationLocationDisplayable

public class StationLocationDisplayable
extends StationModelDisplayable

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
static int ID_ELEVATION
          The identifier for a station elevation (units of meters)
static int ID_ELEVATION_FT
          The identifier for a station elevation (units of feet)
static int ID_ID
          The identifier for a station identifier
static int ID_LAT
          The identifier for a station latitude
static int ID_LATLON
          The identifier for a station latitude/longitude
static int ID_LON
          The identifier for a station longitude
static int ID_NAME
          The identifier for a station name
static String[] ID_NAMES
          Array of names of station information identifiers
static int[] IDS
          Array of station information identifiers
static int SYMBOL_CIRCLE
          The identifier for a circle station location marker
static int SYMBOL_DIAMOND
          The identifier for a diamond station location marker
static int SYMBOL_FCIRCLE
          The identifier for a filled circle station location marker
static int SYMBOL_FDIAMOND
          The identifier for a filled diamond station location marker
static int SYMBOL_FSQUARE
          The identifier for a filled square station location marker
static int SYMBOL_FSTAR
          The identifier for a filled start station location marker
static int SYMBOL_FTRIANGLE
          The identifier for a filled triangle station location marker
static String[] SYMBOL_NAMES
          Array of names of station markers
static int SYMBOL_NONE
          The identifier for no station location marker
static int SYMBOL_PLUS
          The identifier for a plus station location marker
static int SYMBOL_SQUARE
          The identifier for a square station location marker
static int SYMBOL_STAR
          The identifier for a star station location marker
static int SYMBOL_TRIANGLE
          The identifier for a triangle station location marker
static int[] SYMBOLS
          Array of station location markers
 
Fields 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
StationLocationDisplayable(String name)
          Constructs 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
 Displayable cloneForDisplay()
          Returns a clone of this instance suitable for another VisAD display.
protected  void destroy()
          Destroy this instance
 int getIdType()
          Get the id type.
 boolean getShowId()
          Get whether or not the id should be displayed.
 boolean getShowSymbol()
          Get whether or not the station marker symbol should be displayed.
 int getSymbolType()
          Get the symbol type.
 void setColor(Color c)
          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 updateDisplayable()
          Update yourself
 
Methods 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_ID

public static final int ID_ID
The identifier for a station identifier

See Also:
Constant Field Values

ID_NAME

public static final int ID_NAME
The identifier for a station name

See Also:
Constant Field Values

ID_LAT

public static final int ID_LAT
The identifier for a station latitude

See Also:
Constant Field Values

ID_LON

public static final int ID_LON
The identifier for a station longitude

See Also:
Constant Field Values

ID_LATLON

public static final int ID_LATLON
The identifier for a station latitude/longitude

See Also:
Constant Field Values

ID_ELEVATION

public static final int ID_ELEVATION
The identifier for a station elevation (units of meters)

See Also:
Constant Field Values

ID_ELEVATION_FT

public static final int ID_ELEVATION_FT
The identifier for a station elevation (units of feet)

See Also:
Constant Field Values

IDS

public static final int[] IDS
Array of station information identifiers


ID_NAMES

public static final String[] ID_NAMES
Array of names of station information identifiers


SYMBOL_NONE

public static final int SYMBOL_NONE
The identifier for no station location marker

See Also:
Constant Field Values

SYMBOL_SQUARE

public static final int SYMBOL_SQUARE
The identifier for a square station location marker

See Also:
Constant Field Values

SYMBOL_FSQUARE

public static final int SYMBOL_FSQUARE
The identifier for a filled square station location marker

See Also:
Constant Field Values

SYMBOL_CIRCLE

public static final int SYMBOL_CIRCLE
The identifier for a circle station location marker

See Also:
Constant Field Values

SYMBOL_FCIRCLE

public static final int SYMBOL_FCIRCLE
The identifier for a filled circle station location marker

See Also:
Constant Field Values

SYMBOL_TRIANGLE

public static final int SYMBOL_TRIANGLE
The identifier for a triangle station location marker

See Also:
Constant Field Values

SYMBOL_FTRIANGLE

public static final int SYMBOL_FTRIANGLE
The identifier for a filled triangle station location marker

See Also:
Constant Field Values

SYMBOL_DIAMOND

public static final int SYMBOL_DIAMOND
The identifier for a diamond station location marker

See Also:
Constant Field Values

SYMBOL_FDIAMOND

public static final int SYMBOL_FDIAMOND
The identifier for a filled diamond station location marker

See Also:
Constant Field Values

SYMBOL_STAR

public static final int SYMBOL_STAR
The identifier for a star station location marker

See Also:
Constant Field Values

SYMBOL_FSTAR

public static final int SYMBOL_FSTAR
The identifier for a filled start station location marker

See Also:
Constant Field Values

SYMBOL_PLUS

public static final int SYMBOL_PLUS
The identifier for a plus station location marker

See Also:
Constant Field Values

SYMBOLS

public static final int[] SYMBOLS
Array of station location markers


SYMBOL_NAMES

public static final String[] SYMBOL_NAMES
Array of names of station markers

Constructor Detail

StationLocationDisplayable

public StationLocationDisplayable(String name)
                           throws VisADException,
                                  RemoteException
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 object
RemoteException - 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 name
symbolType - type of symbol (e.g., SYMBOL_CIRCLE)
showSymbol - true if symbol should be shown on plot
idType - 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 object
RemoteException - 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 name
symbolType - type of symbol (e.g., SYMBOL_CIRCLE)
showSymbol - true if symbol should be shown on plot
idType - type of station identifier (e.g., ID_ID)
showId - true if ID should be shown on plot
jythonManager - Used for evaluating embedded expressions
Throws:
VisADException - couldn't create the necessary VisAD object
RemoteException - 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 name
jythonManager - Used for evaluating embedded expressions
Throws:
VisADException - couldn't create the necessary VisAD object
RemoteException - 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 name
view - station model view
Throws:
VisADException - couldn't create the necessary VisAD object
RemoteException - couldn't create the remote object
Method Detail

destroy

protected void destroy()
                throws RemoteException,
                       VisADException
Destroy this instance

Overrides:
destroy in class StationModelDisplayable
Throws:
RemoteException - Java RMI Exception
VisADException - 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 plot
idType - 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 object
RemoteException - couldn't create the remote object

setColor

public void setColor(Color c)
              throws VisADException,
                     RemoteException
Set the color of the model.

Overrides:
setColor in class StationModelDisplayable
Parameters:
c - color to use for all components in the model
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

updateDisplayable

public void updateDisplayable()
                       throws VisADException,
                              RemoteException
Update yourself

Throws:
RemoteException - On badness
VisADException - On badness

setSymbolType

public void setSymbolType(int value)
                   throws VisADException,
                          RemoteException
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 object
RemoteException - 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

public void setIdType(int value)
               throws VisADException,
                      RemoteException
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 object
RemoteException - 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

public void setShowId(boolean value)
               throws VisADException,
                      RemoteException
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 object
RemoteException - couldn't create the remote object
See Also:
setIdType(int)

getShowId

public boolean getShowId()
Get whether or not the id should be displayed.

Returns:
true if it should be displayed.

setShowSymbol

public void setShowSymbol(boolean value)
                   throws VisADException,
                          RemoteException
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 object
RemoteException - couldn't create the remote object
See Also:
setSymbolType(int)

getShowSymbol

public boolean getShowSymbol()
Get whether or not the station marker symbol should be displayed.

Returns:
true if it should be displayed.

setStations

public void setStations(List stations)
                 throws VisADException,
                        RemoteException
Set the list stations to be displayed.

Parameters:
stations - List of NamedStationImpls
Throws:
VisADException - couldn't create the necessary VisAD object
RemoteException - couldn't create the remote object

setStations

public void setStations(NamedLocation[] stations)
                 throws VisADException,
                        RemoteException
Set the stations to be displayed.

Parameters:
stations - array of stations.
Throws:
VisADException - couldn't create the necessary VisAD object
RemoteException - couldn't create the remote object

cloneForDisplay

public Displayable cloneForDisplay()
                            throws RemoteException,
                                   VisADException
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.

Overrides:
cloneForDisplay in class StationModelDisplayable
Returns:
A semi-deep clone of this instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.