Class MapData

java.lang.Object
ucar.unidata.gis.maps.MapData
Direct Known Subclasses:
MapDisplayControl.MapState

public class MapData extends Object
Holds basic map information
  • Field Details

    • ATTR_COLOR

      public static final String ATTR_COLOR
      attribute identifier
      See Also:
    • ATTR_LINEWIDTH

      public static final String ATTR_LINEWIDTH
      attribute identifier
      See Also:
    • ATTR_LINESTYLE

      public static final String ATTR_LINESTYLE
      attribute identifier
      See Also:
    • ATTR_FASTRENDERING

      public static final String ATTR_FASTRENDERING
      attribute identifier
      See Also:
    • ATTR_VISIBLE

      public static final String ATTR_VISIBLE
      attribute identifier
      See Also:
    • source

      protected String source
      The file, url or java resource of the map
    • category

      protected String category
      The category of this map
    • description

      protected String description
      The description of the map
    • mapColor

      protected Color mapColor
      The color
    • visible

      protected boolean visible
      Is the map visible
    • lineWidth

      protected float lineWidth
      The line width
    • lineStyle

      protected int lineStyle
      The line style
    • spacing

      protected float spacing
      spacing
    • myMap

      protected MapLines myMap
      The MapLines displayable
    • fastRendering

      protected boolean fastRendering
      fast rendering flag
  • Constructor Details

    • MapData

      public MapData()
      ctor for bundles
    • MapData

      public MapData(Element mapNode, String source)
      Create this MapData from the state in the given xml element
      Parameters:
      mapNode - The xml element
      source - default source
    • MapData

      public MapData(MapData that)
      A copy constructor
      Parameters:
      that - The MapData to initialize from
    • MapData

      public MapData(String mapPath, String description, Color mapColor, float lineWidth, int lineStyle)
      Construct this MapData.
      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
    • MapData

      public MapData(String source, MapLines map)
      Create this object with the given soruce and state held in the map lines
      Parameters:
      source - The source
      map - The map lines
  • Method Details

    • stateChanged

      protected void stateChanged()
      A method that allows derived classes to be told when the state has changed.
    • getMap

      public MapLines getMap()
      Get the MapLines
      Returns:
      The map lines
    • getColor

      public Color getColor()
      Get the Color
      Returns:
      The color_
    • setColor

      public void setColor(Color v)
      Set the color
      Parameters:
      v - the new color
    • getVisible

      public boolean getVisible()
      Is this map visible
      Returns:
      Visibility
    • setVisible

      public void setVisible(boolean v)
      Set the visibility
      Parameters:
      v - The new visibility
    • getSource

      public String getSource()
      Get the source of this map
      Returns:
      The map source
    • setSource

      public void setSource(String v)
      Set the map source
      Parameters:
      v - The new map source
    • getDescription

      public String getDescription()
      Get the description
      Returns:
      The description
    • setDescription

      public void setDescription(String v)
      Set the description
      Parameters:
      v - The new description
    • getLineWidth

      public float getLineWidth()
      Get the line width
      Returns:
      The line width
    • setLineWidth

      public void setLineWidth(float v)
      Set the line width
      Parameters:
      v - The new line width
    • getLineStyle

      public int getLineStyle()
      Get the line style
      Returns:
      The line style
    • setLineStyle

      public void setLineStyle(int v)
      Set the line style
      Parameters:
      v - The new line style
    • getSpacing

      public float getSpacing()
      Get the spacing
      Returns:
      The spacing
    • setSpacing

      public void setSpacing(float v)
      Set the spacing
      Parameters:
      v - The new value for the spacing
    • hashCode

      public int hashCode()
      Use the source as the hashcode
      Overrides:
      hashCode in class Object
      Returns:
      The hashcode
    • equals

      public boolean equals(Object o)
      Use the source as the .equals
      Overrides:
      equals in class Object
      Parameters:
      o - The other object
      Returns:
      Is equals
    • toString

      public String toString()
      Overwrite toString
      Overrides:
      toString in class Object
      Returns:
      The string representation of this object
    • setFastRendering

      public void setFastRendering(boolean value)
      Set the FastRendering property.
      Parameters:
      value - The new value for FastRendering
    • getFastRendering

      public boolean getFastRendering()
      Get the FastRendering property.
      Returns:
      The FastRendering
    • setCategory

      public void setCategory(String value)
      Set the Category property.
      Parameters:
      value - The new value for Category
    • getCategory

      public String getCategory()
      Get the Category property.
      Returns:
      The Category