public class MapData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_COLOR
attribute identifier
|
static java.lang.String |
ATTR_FASTRENDERING
attribute identifier
|
static java.lang.String |
ATTR_LINESTYLE
attribute identifier
|
static java.lang.String |
ATTR_LINEWIDTH
attribute identifier
|
static java.lang.String |
ATTR_VISIBLE
attribute identifier
|
protected java.lang.String |
category
The category of this map
|
protected java.lang.String |
description
The description of the map
|
protected boolean |
fastRendering
fast rendering flag
|
protected int |
lineStyle
The line style
|
protected float |
lineWidth
The line width
|
protected java.awt.Color |
mapColor
The color
|
protected MapLines |
myMap
The MapLines displayable
|
protected java.lang.String |
source
The file, url or java resource of the map
|
protected float |
spacing
spacing
|
protected boolean |
visible
Is the map visible
|
Constructor and Description |
---|
MapData()
ctor for bundles
|
MapData(org.w3c.dom.Element mapNode,
java.lang.String source)
Create this MapData from the state in the given xml element
|
MapData(MapData that)
A copy constructor
|
MapData(java.lang.String source,
MapLines map)
Create this object with the given soruce and state held in the map lines
|
MapData(java.lang.String mapPath,
java.lang.String description,
java.awt.Color mapColor,
float lineWidth,
int lineStyle)
Construct this MapData.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Use the source as the .equals
|
java.lang.String |
getCategory()
Get the Category property.
|
java.awt.Color |
getColor()
Get the Color
|
java.lang.String |
getDescription()
Get the description
|
boolean |
getFastRendering()
Get the FastRendering property.
|
int |
getLineStyle()
Get the line style
|
float |
getLineWidth()
Get the line width
|
MapLines |
getMap()
Get the MapLines
|
java.lang.String |
getSource()
Get the source of this map
|
float |
getSpacing()
Get the spacing
|
boolean |
getVisible()
Is this map visible
|
int |
hashCode()
Use the source as the hashcode
|
void |
setCategory(java.lang.String value)
Set the Category property.
|
void |
setColor(java.awt.Color v)
Set the color
|
void |
setDescription(java.lang.String v)
Set the description
|
void |
setFastRendering(boolean value)
Set the FastRendering property.
|
void |
setLineStyle(int v)
Set the line style
|
void |
setLineWidth(float v)
Set the line width
|
void |
setSource(java.lang.String v)
Set the map source
|
void |
setSpacing(float v)
Set the spacing
|
void |
setVisible(boolean v)
Set the visibility
|
protected void |
stateChanged()
A method that allows derived classes to be told
when the state has changed.
|
java.lang.String |
toString()
Overwrite toString
|
public static final java.lang.String ATTR_COLOR
public static final java.lang.String ATTR_LINEWIDTH
public static final java.lang.String ATTR_LINESTYLE
public static final java.lang.String ATTR_FASTRENDERING
public static final java.lang.String ATTR_VISIBLE
protected java.lang.String source
protected java.lang.String category
protected java.lang.String description
protected java.awt.Color mapColor
protected boolean visible
protected float lineWidth
protected int lineStyle
protected float spacing
protected MapLines myMap
protected boolean fastRendering
public MapData()
public MapData(org.w3c.dom.Element mapNode, java.lang.String source)
mapNode
- The xml elementsource
- default sourcepublic MapData(MapData that)
that
- The MapData to initialize frompublic MapData(java.lang.String mapPath, java.lang.String description, java.awt.Color mapColor, float lineWidth, int lineStyle)
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 usepublic MapData(java.lang.String source, MapLines map)
source
- The sourcemap
- The map linesprotected void stateChanged()
public MapLines getMap()
public java.awt.Color getColor()
public void setColor(java.awt.Color v)
v
- the new colorpublic boolean getVisible()
public void setVisible(boolean v)
v
- The new visibilitypublic java.lang.String getSource()
public void setSource(java.lang.String v)
v
- The new map sourcepublic java.lang.String getDescription()
public void setDescription(java.lang.String v)
v
- The new descriptionpublic float getLineWidth()
public void setLineWidth(float v)
v
- The new line widthpublic int getLineStyle()
public void setLineStyle(int v)
v
- The new line stylepublic float getSpacing()
public void setSpacing(float v)
v
- The new value for the spacingpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The other objectpublic java.lang.String toString()
toString
in class java.lang.Object
public void setFastRendering(boolean value)
value
- The new value for FastRenderingpublic boolean getFastRendering()
public void setCategory(java.lang.String value)
value
- The new value for Categorypublic java.lang.String getCategory()