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 voidApply my map state to the mapprotected voidTake into account the visibility of the display controlbooleaninit(MapDisplayControl mapDisplayControl) Initialize the map.voidSubclassed method to pickup changesvoidsetFastRendering(boolean v) Subclassed method to pickup changesvoidsetLineStyle(int v) Subclassed method to pickup changesvoidsetLineWidth(float v) Subclassed method to pickup changesvoidsetVisible(boolean v) Subclassed method to pickup changesprotected voidA 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:
stateChangedin classMapData
-
applyStateToMap
protected void applyStateToMap()Apply my map state to the map -
setVisible
public void setVisible(boolean v) Subclassed method to pickup changes- Overrides:
setVisiblein classMapData- Parameters:
v- The value
-
setLineStyle
public void setLineStyle(int v) Subclassed method to pickup changes- Overrides:
setLineStylein classMapData- Parameters:
v- The value
-
setColor
Subclassed method to pickup changes -
setLineWidth
public void setLineWidth(float v) Subclassed method to pickup changes- Overrides:
setLineWidthin classMapData- Parameters:
v- The value
-
setFastRendering
public void setFastRendering(boolean v) Subclassed method to pickup changes- Overrides:
setFastRenderingin classMapData- Parameters:
v- The value
-