public class WayParams
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WAY_TYPE_LAYERS
Preferences Node name for Way type rendering control persisting.
|
Constructor and Description |
---|
WayParams(WayType wayType)
Create an instance of WayParams.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
float |
getMaxLabelZoom()
Get the maximum scale value for which this line type's label will be rendered.
|
float |
getMaxLineZoom()
Get the maximum scale value for which this line type will be rendered.
|
java.awt.Paint |
getRenderColor()
Get the rendering color or texture for painting this type of Way.
|
java.awt.Stroke |
getRenderStroke()
Get the Swing Stroke style to use for painting lines of this Way type.
|
WayType |
getWayType()
Get the WayType enumeration value associated with this WayParams object.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isDefault()
Test if this way enumeration has the factory-default settings (i.e., don't need to save in preferences).
|
boolean |
isShown()
Report if Ways of this type should be rendered.
|
void |
loadFromPreferences(java.util.prefs.Preferences prefs)
Load this WayParams object's values from Java Preferences.
|
void |
restoreDefaults()
Set this WayParams object back to the factory-default settings.
|
void |
saveToPreferences(java.util.prefs.Preferences prefs)
Save this WayParams object's values to Java Preferences.
|
void |
setMaxLabelZoom(float maxLabelZoom)
Set the maximum scale value for which this line type's label will be rendered.
|
void |
setMaxLineZoom(float maxLineZoom)
Set the maximum scale value for which this line type will be rendered.
|
void |
setRenderColor(java.awt.Paint renderColor)
Set the rendering color or texture for painting this type of Way.
|
void |
setRenderStroke(java.awt.Stroke renderStroke)
Set the Swing Stroke style to use for painting lines of this Way type.
|
void |
setShown(boolean shown)
Specify if Ways of this type should be rendered.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public static final java.lang.String WAY_TYPE_LAYERS
public WayParams(WayType wayType)
wayType
- the WayType object to initialize the WayParams object frompublic void restoreDefaults()
public boolean isDefault()
public WayType getWayType()
public java.awt.Paint getRenderColor()
public void setRenderColor(java.awt.Paint renderColor)
renderColor
- Paint to use for rendering this Way typepublic java.awt.Stroke getRenderStroke()
public void setRenderStroke(java.awt.Stroke renderStroke)
renderStroke
- Stroke for renderingpublic float getMaxLineZoom()
public void setMaxLineZoom(float maxLineZoom)
maxLineZoom
- float scale valuepublic float getMaxLabelZoom()
public void setMaxLabelZoom(float maxLabelZoom)
maxLabelZoom
- float scale valuepublic boolean isShown()
public void setShown(boolean shown)
shown
- boolean true if Ways of the associated type should be rendered, false if notpublic void loadFromPreferences(java.util.prefs.Preferences prefs)
prefs
- Preferences object to contain all the WayParams instancespublic void saveToPreferences(java.util.prefs.Preferences prefs)
prefs
- Preferences object to contain all the WayParams instancespublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object