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 String
attribute identifierstatic final String
attribute identifierstatic final String
attribute identifierstatic final String
attribute identifierstatic final String
attribute identifierprotected String
The category of this mapprotected String
The description of the mapprotected boolean
fast rendering flagprotected int
The line styleprotected float
The line widthprotected Color
The colorprotected MapLines
The MapLines displayableprotected String
The file, url or java resource of the mapprotected float
spacingprotected boolean
Is 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 TypeMethodDescriptionboolean
Use the source as the .equalsGet the Category property.getColor()
Get the ColorGet the descriptionboolean
Get the FastRendering property.int
Get the line stylefloat
Get the line widthgetMap()
Get the MapLinesGet the source of this mapfloat
Get the spacingboolean
Is this map visibleint
hashCode()
Use the source as the hashcodevoid
setCategory
(String value) Set the Category property.void
Set the colorvoid
Set the descriptionvoid
setFastRendering
(boolean value) Set the FastRendering property.void
setLineStyle
(int v) Set the line stylevoid
setLineWidth
(float v) Set the line widthvoid
Set the map sourcevoid
setSpacing
(float v) Set the spacingvoid
setVisible
(boolean v) Set the visibilityprotected void
A 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
-