public class WayParams
extends java.lang.Object
| 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() |
float |
getMaxLineZoom() |
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) |
void |
restoreDefaults()
Set this WayParams object back to the factory-default settings.
|
void |
saveToPreferences(java.util.prefs.Preferences prefs) |
void |
setMaxLabelZoom(float maxLabelZoom) |
void |
setMaxLineZoom(float maxLineZoom) |
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)
public float getMaxLabelZoom()
public void setMaxLabelZoom(float maxLabelZoom)
public 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)
public void saveToPreferences(java.util.prefs.Preferences prefs)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - 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