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>propertyprivate 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.StringgetKey()Replies the property key.StyleSettingGuigetStyleSettingGui()Create a matchingStyleSettingGuiinstances for a givenStyleSettingobject.TgetValue()gets the value for this settingvoidsetStringValue(java.lang.String value)Sets this property to the specified string value.voidsetValue(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:StyleSettinggets the value for this setting- Specified by:
getValuein 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:StyleSettingCreate a matchingStyleSettingGuiinstances for a givenStyleSettingobject.- Specified by:
getStyleSettingGuiin interfaceStyleSetting- Returns:
- matching
StyleSettingGui
-
-