de.caff.util.settings.swing

## Class SwingBooleanProperty

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

- All Implemented Interfaces:
    ChangeableItem, Property<java.lang.Boolean>, EditableProperty, java.io.Serializable
  Direct Known Subclasses:
    SwingBooleanPreferenceProperty

      public class SwingBooleanProperty
      extends AbstractBasicSimpleEditableChangeableItem
      implements Property<java.lang.Boolean>

  Editable boolean preference property.
  Author:
    Rammi
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwingBooleanProperty(java.lang.String basicName, java.lang.String baseTag, boolean autoSave, boolean value)` Constructor.

  - ### Method Summary

    All 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.
    `EditorProvider` | `getEditorProvider(java.util.Locale l)` Get the editor components for editing this preference property.
    `java.lang.Boolean` | `getValue()` Get the current value.
    `boolean` | `isAutoSave()` Is auto save enabled?
    `void` | `setValue(boolean value)` Set the value.
    `void` | `setValue(java.lang.Boolean value)` Set the value.

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

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

      `getName`

- - ### Constructor Detail

    - #### SwingBooleanProperty

          public SwingBooleanProperty(@NotNull
                                      java.lang.String basicName,
                                      @NotNull
                                      java.lang.String baseTag,
                                      boolean autoSave,
                                      boolean value)

      Constructor.
      Parameters:
        `basicName` - property tag
        `baseTag` - i18n tag
        `autoSave` - automatically save value on changes?
        `value` - default value

  - ### Method Detail

    - #### getEditorProvider

          @NotNull
          public EditorProvider getEditorProvider(@Nullable
                                                           java.util.Locale l)

      Get the editor components for editing this preference property.
      Specified by:
        `getEditorProvider` in interface `EditableProperty`
      Parameters:
        `l` - locale used for i18n
      Returns:
        editor components

    - #### isAutoSave

          public boolean isAutoSave()

      Is auto save enabled?
      Returns:
        the answer

    - #### getValue

          public java.lang.Boolean getValue()

      Get the current value.
      Specified by:
        `getValue` in interface `Property<java.lang.Boolean>`
      Returns:
        the value

    - #### setValue

          public void setValue(@NotNull
                               java.lang.Boolean value)

      Set the value.
      Specified by:
        `setValue` in interface `Property<java.lang.Boolean>`
      Parameters:
        `value` - new value

    - #### setValue

          public void setValue(boolean value)

      Set the value.
      Parameters:
        `value` - new 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