de.caff.util.settings.swing

## Class SwingEnumPreferenceProperty<E>

- java.lang.Object
- - de.caff.util.settings.AbstractBasicChangeableItem
  - - de.caff.util.settings.AbstractBasicLocalizableChangeableItem
    - - de.caff.util.settings.swing.AbstractBasicSimpleEditableChangeableItem
      - - de.caff.util.settings.swing.SwingEnumProperty<E>
        - - de.caff.util.settings.swing.SwingEnumPreferenceProperty<E>

- All Implemented Interfaces:
    ChangeableItem, EnumPreferenceProperty<E>, EnumProperty<E>, PreferenceProperty, EditablePreferenceProperty, EditableProperty, java.io.Serializable

      public class SwingEnumPreferenceProperty<E>
      extends SwingEnumProperty<E>
      implements EnumPreferenceProperty<E>, EditablePreferenceProperty

  An enum preference property. This is one value out of a set of values.
  Author:
    Rammi
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class de.caff.util.settings.swing.SwingEnumProperty

      `SwingEnumProperty.EnumValueComparator<T>`

  - ### Field Summary

    - ### Fields inherited from interface de.caff.util.settings.PreferenceProperty

      `PROPERTY_VALUE`

  - ### Constructor Summary

    Constructors
    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.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class de.caff.util.settings.swing.SwingEnumProperty

      `createMenuItem, getEditorProvider, getEnumValueComparator, getEnumValues, getEnumValues, getShortNameEnumValueComparator, getValue, setValue`

    - ### Methods inherited from class de.caff.util.settings.AbstractBasicLocalizableChangeableItem

      `getBaseTag, getLabelString, getMenuString, getName, getString`

    - ### Methods inherited from class de.caff.util.settings.AbstractBasicChangeableItem

      `addValueChangeListener, addValueChangeListenerWeakly, firePropertyChange, fireValueChange, fireValueChange, fireValueChange, getBasicName, getPropertyName, removeValueChangeListener, removeValueChangeListenerWeakly`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface de.caff.util.settings.EnumProperty

      `getEnumValues, getValue`

    - ### Methods inherited from interface de.caff.util.settings.swing.EditableProperty

      `getEditorProvider, getName`

    - ### Methods inherited from interface de.caff.util.settings.ChangeableItem

      `addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly`

- - ### Constructor Detail

    - #### SwingEnumPreferenceProperty

          public SwingEnumPreferenceProperty(@NotNull
                                             EnumValue<E> startValue,
                                             @NotNull
                                             java.lang.String basicName,
                                             @NotNull
                                             java.lang.String baseTag,
                                             @NotNull
                                             EnumValue<E>... values)

      Constructor.
      Parameters:
        `startValue` - the start value of this property
        `basicName` - the name of this property
        `baseTag` - the basic i18n tag of this property
        `values` - the possible values of this property

    - #### SwingEnumPreferenceProperty

          public SwingEnumPreferenceProperty(@NotNull
                                             EnumValue<E> startValue,
                                             @NotNull
                                             java.lang.String basicName,
                                             @NotNull
                                             java.lang.String baseTag,
                                             @NotNull
                                             java.util.Collection<EnumValue<E>> values)

      Constructor.
      Parameters:
        `startValue` - the start value of this property
        `basicName` - the name of this property
        `baseTag` - the basic i18n tag of this property
        `values` - the possible values of this property

    - #### SwingEnumPreferenceProperty

          public SwingEnumPreferenceProperty(@NotNull
                                             EnumValue<E> startValue,
                                             @NotNull
                                             java.lang.String basicName,
                                             @NotNull
                                             java.lang.String baseTag,
                                             @NotNull
                                             SwingEnumProperty.EnumValueComparator<E> enumValueComparator,
                                             @NotNull
                                             EnumValue<E>... values)

      Constructor.
      Parameters:
        `startValue` - the start value of this property
        `basicName` - the name of this property
        `baseTag` - the basic i18n tag of this property
        `enumValueComparator` - comparator for `EnumValue`s used to sort the values for display
        `values` - the possible values of this property

    - #### SwingEnumPreferenceProperty

          public 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)

      Constructor.
      Parameters:
        `startValue` - the start value of this property
        `basicName` - the name of this property
        `baseTag` - the basic i18n tag of this property
        `enumValueComparator` - comparator for `EnumValue`s used to sort the values for display
        `values` - the possible values of this property

  - ### Method Detail

    - #### readFrom

          public void readFrom(@NotNull
                               java.util.prefs.Preferences preferences)

      Read the property value from the preferences.
      Specified by:
        `readFrom` in interface `PreferenceProperty`
      Parameters:
        `preferences` - preferences from where to read the property value

    - #### storeTo

          public void storeTo(@NotNull
                              java.util.prefs.Preferences preferences)

      Store the current property value in the preferences.
      Specified by:
        `storeTo` in interface `PreferenceProperty`
      Parameters:
        `preferences` - preferences where to store the property value