Class StyleSetting.PropertyStyleSetting<T>
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.StyleSetting.LabeledStyleSetting
-
- org.openstreetmap.josm.gui.mappaint.StyleSetting.PropertyStyleSetting<T>
-
- Type Parameters:
T
- The property type
- All Implemented Interfaces:
java.lang.Comparable<StyleSetting.LabeledStyleSetting>
,StyleSetting
- Direct Known Subclasses:
StyleSetting.BooleanStyleSetting
,StyleSetting.ColorStyleSetting
- Enclosing interface:
- StyleSetting
public static class StyleSetting.PropertyStyleSetting<T> extends StyleSetting.LabeledStyleSetting implements StyleSetting
A setting for a style
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.mappaint.StyleSetting
StyleSetting.BooleanStyleSetting, StyleSetting.ColorStyleSetting, StyleSetting.LabeledStyleSetting, StyleSetting.PropertyStyleSetting<T>, StyleSetting.StyleSettingGroup
-
-
Field Summary
Fields Modifier and Type Field Description private AbstractToStringProperty<T>
property
private java.lang.Class<T>
type
-
Fields inherited from class org.openstreetmap.josm.gui.mappaint.StyleSetting.LabeledStyleSetting
label, parentStyle
-
-
Constructor Summary
Constructors Constructor Description PropertyStyleSetting(StyleSource parentStyle, java.lang.String label, java.lang.Class<T> type, AbstractToStringProperty<T> property)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getKey()
Replies the property key.StyleSettingGui
getStyleSettingGui()
Create a matchingStyleSettingGui
instances for a givenStyleSetting
object.T
getValue()
gets the value for this settingvoid
setStringValue(java.lang.String value)
Sets this property to the specified string value.void
setValue(T value)
Sets this property to the specified value.-
Methods inherited from class org.openstreetmap.josm.gui.mappaint.StyleSetting.LabeledStyleSetting
compareTo, equals, hashCode
-
-
-
-
Field Detail
-
property
private final AbstractToStringProperty<T> property
-
-
Constructor Detail
-
PropertyStyleSetting
PropertyStyleSetting(StyleSource parentStyle, java.lang.String label, java.lang.Class<T> type, AbstractToStringProperty<T> property)
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Replies the property key.- Returns:
- The property key
-
getValue
public T getValue()
Description copied from interface:StyleSetting
gets the value for this setting- Specified by:
getValue
in interfaceStyleSetting
- Returns:
- The value the user selected
-
setValue
public void setValue(T value)
Sets this property to the specified value.- Parameters:
value
- The new value of this property
-
setStringValue
public void setStringValue(java.lang.String value)
Sets this property to the specified string value.- Parameters:
value
- The new string value of this property
-
getStyleSettingGui
public StyleSettingGui getStyleSettingGui()
Description copied from interface:StyleSetting
Create a matchingStyleSettingGui
instances for a givenStyleSetting
object.- Specified by:
getStyleSettingGui
in interfaceStyleSetting
- Returns:
- matching
StyleSettingGui
-
-