Class MapDisplayControl.MapState

java.lang.Object
ucar.unidata.gis.maps.MapData
ucar.unidata.idv.control.MapDisplayControl.MapState
Enclosing class:
MapDisplayControl

public static class MapDisplayControl.MapState extends MapData
This class holds the state associated with a given map
  • Constructor Details

    • MapState

      public MapState()
      ctor for persistence
    • MapState

      public MapState(MapData that)
      ctor for instantiating from a MapData
      Parameters:
      that - The MapData to copy from
    • MapState

      public MapState(String mapPath, String description, Color mapColor, float lineWidth, int lineStyle)
      Construct this MapState.
      Parameters:
      mapPath - File path, resource path or url of the map file.
      description - Map description
      mapColor - The initial color to use
      lineWidth - The initial line width to use
      lineStyle - The initial line style to use
  • Method Details

    • checkVisibility

      protected void checkVisibility()
      Take into account the visibility of the display control
    • init

      public boolean init(MapDisplayControl mapDisplayControl)
      Initialize the map.
      Parameters:
      mapDisplayControl - The display control we are part of
      Returns:
      true if everything ok. False otherwise. If a problem this method will signal the user.
    • stateChanged

      protected void stateChanged()
      A method that allows derived classes to be told when the state has changed.
      Overrides:
      stateChanged in class MapData
    • applyStateToMap

      protected void applyStateToMap()
      Apply my map state to the map
    • setVisible

      public void setVisible(boolean v)
      Subclassed method to pickup changes
      Overrides:
      setVisible in class MapData
      Parameters:
      v - The value
    • setLineStyle

      public void setLineStyle(int v)
      Subclassed method to pickup changes
      Overrides:
      setLineStyle in class MapData
      Parameters:
      v - The value
    • setColor

      public void setColor(Color v)
      Subclassed method to pickup changes
      Overrides:
      setColor in class MapData
      Parameters:
      v - The value
    • setLineWidth

      public void setLineWidth(float v)
      Subclassed method to pickup changes
      Overrides:
      setLineWidth in class MapData
      Parameters:
      v - The value
    • setFastRendering

      public void setFastRendering(boolean v)
      Subclassed method to pickup changes
      Overrides:
      setFastRendering in class MapData
      Parameters:
      v - The value