de.caff.util.settings.swing

## Class SwingLookAndFeelPreferenceProperty

- java.lang.Object
- - de.caff.util.settings.AbstractBasicChangeableItem
  - - de.caff.util.settings.AbstractBasicLocalizableChangeableItem
    - - de.caff.util.settings.swing.SwingLookAndFeelPreferenceProperty

- All Implemented Interfaces:
    ChangeableItem, PreferenceProperty, StringListPreferenceProperty, java.io.Serializable

      public final class SwingLookAndFeelPreferenceProperty
      extends AbstractBasicLocalizableChangeableItem
      implements StringListPreferenceProperty

  Allow to select the Look And Feel.
  Author:
    Rammi
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PROPERTY_LAF_NAME` Property key for the look and feel name.

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

      `PROPERTY_VALUE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.swing.JMenuItem` | `createMenuItem(java.util.Locale l)` Create a menu item for this boolean property.
    `javax.swing.UIManager.LookAndFeelInfo` | `getCurrentLookAndFeelInfo()` Get the currently active LAF info.
    `static SwingLookAndFeelPreferenceProperty` | `getInstance()` Get the only instance of the laf property.
    `java.util.Collection<java.lang.String>` | `getStringList()` Get the collection of strings.
    `void` | `readFrom(java.util.prefs.Preferences preferences)` Read the property value from the preferences.
    `void` | `setLookAndFeel(java.lang.String name)` Set the look and feel.
    `void` | `storeTo(java.util.prefs.Preferences preferences)` Store the current property value in the preferences.

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

      `addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly`

- - ### Field Detail

    - #### PROPERTY_LAF_NAME

          public static final java.lang.String PROPERTY_LAF_NAME

      Property key for the look and feel name.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          @NotNull
          public static SwingLookAndFeelPreferenceProperty getInstance()

      Get the only instance of the laf property.
      Returns:
        the instance

    - #### getStringList

          public java.util.Collection<java.lang.String> getStringList()

      Get the collection of strings.
      Specified by:
        `getStringList` in interface `StringListPreferenceProperty`
      Returns:
        String list

    - #### getCurrentLookAndFeelInfo

          public javax.swing.UIManager.LookAndFeelInfo getCurrentLookAndFeelInfo()

      Get the currently active LAF info.
      Returns:
        LAF info

    - #### setLookAndFeel

          public void setLookAndFeel(@NotNull
                                     java.lang.String name)

      Set the look and feel.
      Parameters:
        `name` - name of look and feel

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

    - #### createMenuItem

          public javax.swing.JMenuItem createMenuItem(java.util.Locale l)

      Create a menu item for this boolean property.
      Parameters:
        `l` - locale
      Returns:
        menu item