de.caff.util.settings.swing

## Class SwingColorPreferenceProperty

- java.lang.Object
- - de.caff.util.settings.AbstractBasicChangeableItem
  - - de.caff.util.settings.AbstractBasicLocalizableChangeableItem
    - - de.caff.util.settings.swing.AbstractBasicSimpleEditableChangeableItem
      - - de.caff.util.settings.swing.SwingColorProperty
        - - de.caff.util.settings.swing.SwingColorPreferenceProperty

- All Implemented Interfaces:
    ChangeableItem, PreferenceProperty, Property<java.awt.Color>, EditablePreferenceProperty, EditableProperty, java.io.Serializable

      public class SwingColorPreferenceProperty
      extends SwingColorProperty
      implements EditablePreferenceProperty

  A preference property with a color value.
  Author:
    Rammi
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class de.caff.util.settings.swing.SwingColorProperty

      `autoSave, value`

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

      `PROPERTY_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwingColorPreferenceProperty(java.lang.String basicName, java.lang.String baseTag, java.awt.Color defaultValue)` Create a color preference property.
    `SwingColorPreferenceProperty(java.lang.String basicName, java.lang.String baseTag, java.awt.Color defaultValue, boolean autoSave)` Create a color preference property.

  - ### 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.SwingColorProperty

      `createMenuItem, getEditorProvider, 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.swing.EditableProperty

      `getEditorProvider, getName`

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

      `addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly`

- - ### Constructor Detail

    - #### SwingColorPreferenceProperty

          public SwingColorPreferenceProperty(@NotNull
                                              java.lang.String basicName,
                                              @NotNull
                                              java.lang.String baseTag,
                                              java.awt.Color defaultValue)

      Create a color preference property. Changes to this property are not immediately saved.
      Parameters:
        `basicName` - basic name (prefix)
        `baseTag` - basic i18n tag
        `defaultValue` - the default color

    - #### SwingColorPreferenceProperty

          public SwingColorPreferenceProperty(@NotNull
                                              java.lang.String basicName,
                                              @NotNull
                                              java.lang.String baseTag,
                                              java.awt.Color defaultValue,
                                              boolean autoSave)

      Create a color preference property.
      Parameters:
        `basicName` - basic name (prefix)
        `baseTag` - basic i18n tag
        `defaultValue` - the default color
        `autoSave` - save changed values immediately

  - ### 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