Package ucar.unidata.idv.control
Class MapDisplayControl.MapState
java.lang.Object
ucar.unidata.gis.maps.MapData
ucar.unidata.idv.control.MapDisplayControl.MapState
- Enclosing class:
MapDisplayControl
This class holds the state associated with a given map
-
Field Summary
Fields inherited from class ucar.unidata.gis.maps.MapData
ATTR_COLOR, ATTR_FASTRENDERING, ATTR_LINESTYLE, ATTR_LINEWIDTH, ATTR_VISIBLE, category, description, fastRendering, lineStyle, lineWidth, mapColor, myMap, source, spacing, visible
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Apply my map state to the mapprotected void
Take into account the visibility of the display controlboolean
init
(MapDisplayControl mapDisplayControl) Initialize the map.void
Subclassed method to pickup changesvoid
setFastRendering
(boolean v) Subclassed method to pickup changesvoid
setLineStyle
(int v) Subclassed method to pickup changesvoid
setLineWidth
(float v) Subclassed method to pickup changesvoid
setVisible
(boolean v) Subclassed method to pickup changesprotected void
A method that allows derived classes to be told when the state has changed.Methods inherited from class ucar.unidata.gis.maps.MapData
equals, getCategory, getColor, getDescription, getFastRendering, getLineStyle, getLineWidth, getMap, getSource, getSpacing, getVisible, hashCode, setCategory, setDescription, setSource, setSpacing, toString
-
Constructor Details
-
MapState
public MapState()ctor for persistence -
MapState
ctor for instantiating from a MapData- Parameters:
that
- The MapData to copy from
-
MapState
Construct this MapState.- Parameters:
mapPath
- File path, resource path or url of the map file.description
- Map descriptionmapColor
- The initial color to uselineWidth
- The initial line width to uselineStyle
- The initial line style to use
-
-
Method Details
-
checkVisibility
protected void checkVisibility()Take into account the visibility of the display control -
init
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 classMapData
-
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 classMapData
- Parameters:
v
- The value
-
setLineStyle
public void setLineStyle(int v) Subclassed method to pickup changes- Overrides:
setLineStyle
in classMapData
- Parameters:
v
- The value
-
setColor
Subclassed method to pickup changes -
setLineWidth
public void setLineWidth(float v) Subclassed method to pickup changes- Overrides:
setLineWidth
in classMapData
- Parameters:
v
- The value
-
setFastRendering
public void setFastRendering(boolean v) Subclassed method to pickup changes- Overrides:
setFastRendering
in classMapData
- Parameters:
v
- The value
-