Package ucar.unidata.gis.maps
Class MapData
java.lang.Object
ucar.unidata.gis.maps.MapData
- Direct Known Subclasses:
MapDisplayControl.MapState
Holds basic map information
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringattribute identifierstatic final Stringattribute identifierstatic final Stringattribute identifierstatic final Stringattribute identifierstatic final Stringattribute identifierprotected StringThe category of this mapprotected StringThe description of the mapprotected booleanfast rendering flagprotected intThe line styleprotected floatThe line widthprotected ColorThe colorprotected MapLinesThe MapLines displayableprotected StringThe file, url or java resource of the mapprotected floatspacingprotected booleanIs the map visible -
Constructor Summary
ConstructorsConstructorDescriptionMapData()ctor for bundlesConstruct this MapData.Create this object with the given soruce and state held in the map linesCreate this MapData from the state in the given xml elementA copy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanUse the source as the .equalsGet the Category property.getColor()Get the ColorGet the descriptionbooleanGet the FastRendering property.intGet the line stylefloatGet the line widthgetMap()Get the MapLinesGet the source of this mapfloatGet the spacingbooleanIs this map visibleinthashCode()Use the source as the hashcodevoidsetCategory(String value) Set the Category property.voidSet the colorvoidSet the descriptionvoidsetFastRendering(boolean value) Set the FastRendering property.voidsetLineStyle(int v) Set the line stylevoidsetLineWidth(float v) Set the line widthvoidSet the map sourcevoidsetSpacing(float v) Set the spacingvoidsetVisible(boolean v) Set the visibilityprotected voidA method that allows derived classes to be told when the state has changed.toString()Overwrite toString
-
Field Details
-
ATTR_COLOR
attribute identifier- See Also:
-
ATTR_LINEWIDTH
attribute identifier- See Also:
-
ATTR_LINESTYLE
attribute identifier- See Also:
-
ATTR_FASTRENDERING
attribute identifier- See Also:
-
ATTR_VISIBLE
attribute identifier- See Also:
-
source
The file, url or java resource of the map -
category
The category of this map -
description
The description of the map -
mapColor
The color -
visible
protected boolean visibleIs the map visible -
lineWidth
protected float lineWidthThe line width -
lineStyle
protected int lineStyleThe line style -
spacing
protected float spacingspacing -
myMap
The MapLines displayable -
fastRendering
protected boolean fastRenderingfast rendering flag
-
-
Constructor Details
-
MapData
public MapData()ctor for bundles -
MapData
Create this MapData from the state in the given xml element- Parameters:
mapNode- The xml elementsource- default source
-
MapData
A copy constructor- Parameters:
that- The MapData to initialize from
-
MapData
Construct this MapData.- 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
-
MapData
Create this object with the given soruce and state held in the map lines- Parameters:
source- The sourcemap- The map lines
-
-
Method Details
-
stateChanged
protected void stateChanged()A method that allows derived classes to be told when the state has changed. -
getMap
Get the MapLines- Returns:
- The map lines
-
getColor
Get the Color- Returns:
- The color_
-
setColor
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
Get the source of this map- Returns:
- The map source
-
setSource
Set the map source- Parameters:
v- The new map source
-
getDescription
Get the description- Returns:
- The description
-
setDescription
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 -
equals
Use the source as the .equals -
toString
Overwrite toString -
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
Set the Category property.- Parameters:
value- The new value for Category
-
getCategory
Get the Category property.- Returns:
- The Category
-