Class 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.
  • Field Details

    • ID_ID

      public static final int ID_ID
      The identifier for a station identifier
      See Also:
    • ID_NAME

      public static final int ID_NAME
      The identifier for a station name
      See Also:
    • ID_LAT

      public static final int ID_LAT
      The identifier for a station latitude
      See Also:
    • ID_LON

      public static final int ID_LON
      The identifier for a station longitude
      See Also:
    • ID_LATLON

      public static final int ID_LATLON
      The identifier for a station latitude/longitude
      See Also:
    • ID_ELEVATION

      public static final int ID_ELEVATION
      The identifier for a station elevation (units of meters)
      See Also:
    • ID_ELEVATION_FT

      public static final int ID_ELEVATION_FT
      The identifier for a station elevation (units of feet)
      See Also:
    • 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:
    • SYMBOL_SQUARE

      public static final int SYMBOL_SQUARE
      The identifier for a square station location marker
      See Also:
    • SYMBOL_FSQUARE

      public static final int SYMBOL_FSQUARE
      The identifier for a filled square station location marker
      See Also:
    • SYMBOL_CIRCLE

      public static final int SYMBOL_CIRCLE
      The identifier for a circle station location marker
      See Also:
    • SYMBOL_FCIRCLE

      public static final int SYMBOL_FCIRCLE
      The identifier for a filled circle station location marker
      See Also:
    • SYMBOL_TRIANGLE

      public static final int SYMBOL_TRIANGLE
      The identifier for a triangle station location marker
      See Also:
    • SYMBOL_FTRIANGLE

      public static final int SYMBOL_FTRIANGLE
      The identifier for a filled triangle station location marker
      See Also:
    • SYMBOL_DIAMOND

      public static final int SYMBOL_DIAMOND
      The identifier for a diamond station location marker
      See Also:
    • SYMBOL_FDIAMOND

      public static final int SYMBOL_FDIAMOND
      The identifier for a filled diamond station location marker
      See Also:
    • SYMBOL_STAR

      public static final int SYMBOL_STAR
      The identifier for a star station location marker
      See Also:
    • SYMBOL_FSTAR

      public static final int SYMBOL_FSTAR
      The identifier for a filled start station location marker
      See Also:
    • SYMBOL_PLUS

      public static final int SYMBOL_PLUS
      The identifier for a plus station location marker
      See Also:
    • 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 Details

    • 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 Details

    • 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:
    • 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:
    • 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.