Package org.ka2ddo.yaac.gui.osm
Class WayParams
java.lang.Object
org.ka2ddo.yaac.gui.osm.WayParams
- All Implemented Interfaces:
Serializable
This class contains the current graphical rendering settings for a WayType.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Preferences Node name for Way type rendering control persisting. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.float
Get the maximum scale value for which this line type's label will be rendered.float
Get the maximum scale value for which this line type will be rendered.Get the rendering color or texture for painting this type of Way.Get the Swing Stroke style to use for painting lines of this Way type.Get the WayType enumeration value associated with this WayParams object.int
hashCode()
Returns a hash code value for the object.boolean
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
(Preferences prefs) Load this WayParams object's values from Java Preferences.void
Set this WayParams object back to the factory-default settings.void
saveToPreferences
(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
(Paint renderColor) Set the rendering color or texture for painting this type of Way.void
setRenderStroke
(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.toString()
Returns a string representation of the object.
-
Field Details
-
WAY_TYPE_LAYERS
Preferences Node name for Way type rendering control persisting.- See Also:
-
-
Constructor Details
-
WayParams
Create an instance of WayParams.- Parameters:
wayType
- the WayType object to initialize the WayParams object from
-
-
Method Details
-
restoreDefaults
public void restoreDefaults()Set this WayParams object back to the factory-default settings. -
isDefault
public boolean isDefault()Test if this way enumeration has the factory-default settings (i.e., don't need to save in preferences).- Returns:
- boolean true if this WayParams has the hard-coded defaults for its WayType
-
getWayType
Get the WayType enumeration value associated with this WayParams object.- Returns:
- associated WayType value
-
getRenderColor
Get the rendering color or texture for painting this type of Way.- Returns:
- Paint
-
setRenderColor
Set the rendering color or texture for painting this type of Way.- Parameters:
renderColor
- Paint to use for rendering this Way type
-
getRenderStroke
Get the Swing Stroke style to use for painting lines of this Way type.- Returns:
- Stroke for rendering
-
setRenderStroke
Set the Swing Stroke style to use for painting lines of this Way type.- Parameters:
renderStroke
- Stroke for rendering
-
getMaxLineZoom
public float getMaxLineZoom()Get the maximum scale value for which this line type will be rendered.- Returns:
- float scale value
-
setMaxLineZoom
public void setMaxLineZoom(float maxLineZoom) Set the maximum scale value for which this line type will be rendered.- Parameters:
maxLineZoom
- float scale value
-
getMaxLabelZoom
public float getMaxLabelZoom()Get the maximum scale value for which this line type's label will be rendered.- Returns:
- float scale value
-
setMaxLabelZoom
public void setMaxLabelZoom(float maxLabelZoom) Set the maximum scale value for which this line type's label will be rendered.- Parameters:
maxLabelZoom
- float scale value
-
isShown
public boolean isShown()Report if Ways of this type should be rendered.- Returns:
- boolean true if Ways of the associated type should be rendered, false if not
-
setShown
public void setShown(boolean shown) Specify if Ways of this type should be rendered.- Parameters:
shown
- boolean true if Ways of the associated type should be rendered, false if not
-
loadFromPreferences
Load this WayParams object's values from Java Preferences.- Parameters:
prefs
- Preferences object to contain all the WayParams instances
-
saveToPreferences
Save this WayParams object's values to Java Preferences.- Parameters:
prefs
- Preferences object to contain all the WayParams instances
-
hashCode
public int hashCode()Returns a hash code value for the object. -
equals
Indicates whether some other object is "equal to" this one. -
toString
Returns a string representation of the object.
-