public class SwingEnumPreferenceProperty<E> extends SwingEnumProperty<E> implements EnumPreferenceProperty<E>, EditablePreferenceProperty
SwingEnumProperty.EnumValueComparator<T>
PROPERTY_VALUE
Constructor and Description |
---|
SwingEnumPreferenceProperty(EnumValue<E> startValue,
java.lang.String basicName,
java.lang.String baseTag,
java.util.Collection<EnumValue<E>> values)
Constructor.
|
SwingEnumPreferenceProperty(EnumValue<E> startValue,
java.lang.String basicName,
java.lang.String baseTag,
EnumValue<E>... values)
Constructor.
|
SwingEnumPreferenceProperty(EnumValue<E> startValue,
java.lang.String basicName,
java.lang.String baseTag,
SwingEnumProperty.EnumValueComparator<E> enumValueComparator,
java.util.Collection<EnumValue<E>> values)
Constructor.
|
SwingEnumPreferenceProperty(EnumValue<E> startValue,
java.lang.String basicName,
java.lang.String baseTag,
SwingEnumProperty.EnumValueComparator<E> enumValueComparator,
EnumValue<E>... values)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
readFrom(java.util.prefs.Preferences preferences)
Read the property value from the preferences.
|
void |
storeTo(java.util.prefs.Preferences preferences)
Store the current property value in the preferences.
|
createMenuItem, getEditorProvider, getEnumValueComparator, getEnumValues, getEnumValues, getShortNameEnumValueComparator, getValue, setValue
getBaseTag, getLabelString, getMenuString, getName, getString
addValueChangeListener, addValueChangeListenerWeakly, firePropertyChange, fireValueChange, fireValueChange, fireValueChange, getBasicName, getPropertyName, removeValueChangeListener, removeValueChangeListenerWeakly
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEnumValues, getValue
getEditorProvider, getName
addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly
public SwingEnumPreferenceProperty(@NotNull EnumValue<E> startValue, @NotNull java.lang.String basicName, @NotNull java.lang.String baseTag, @NotNull EnumValue<E>... values)
startValue
- the start value of this propertybasicName
- the name of this propertybaseTag
- the basic i18n tag of this propertyvalues
- the possible values of this propertypublic SwingEnumPreferenceProperty(@NotNull EnumValue<E> startValue, @NotNull java.lang.String basicName, @NotNull java.lang.String baseTag, @NotNull java.util.Collection<EnumValue<E>> values)
startValue
- the start value of this propertybasicName
- the name of this propertybaseTag
- the basic i18n tag of this propertyvalues
- the possible values of this propertypublic SwingEnumPreferenceProperty(@NotNull EnumValue<E> startValue, @NotNull java.lang.String basicName, @NotNull java.lang.String baseTag, @NotNull SwingEnumProperty.EnumValueComparator<E> enumValueComparator, @NotNull EnumValue<E>... values)
startValue
- the start value of this propertybasicName
- the name of this propertybaseTag
- the basic i18n tag of this propertyenumValueComparator
- comparator for EnumValue
s used to sort the values for displayvalues
- the possible values of this propertypublic SwingEnumPreferenceProperty(@NotNull EnumValue<E> startValue, @NotNull java.lang.String basicName, @NotNull java.lang.String baseTag, @NotNull SwingEnumProperty.EnumValueComparator<E> enumValueComparator, @NotNull java.util.Collection<EnumValue<E>> values)
startValue
- the start value of this propertybasicName
- the name of this propertybaseTag
- the basic i18n tag of this propertyenumValueComparator
- comparator for EnumValue
s used to sort the values for displayvalues
- the possible values of this propertypublic void readFrom(@NotNull java.util.prefs.Preferences preferences)
readFrom
in interface PreferenceProperty
preferences
- preferences from where to read the property valuepublic void storeTo(@NotNull java.util.prefs.Preferences preferences)
storeTo
in interface PreferenceProperty
preferences
- preferences where to store the property value