de.caff.util.settings.swing

## Class EnumEditor<E>

- java.lang.Object
- - de.caff.util.settings.swing.AbstractBasicEditorProvider
  - - de.caff.util.settings.swing.EnumEditor<E>

- All Implemented Interfaces:
    EditorProvider, java.beans.PropertyChangeListener, java.util.EventListener

      public class EnumEditor<E>
      extends AbstractBasicEditorProvider
      implements java.beans.PropertyChangeListener

  An editor for enum values.
  Author:
    Rammi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnumEditor(SwingEnumProperty<E> property, boolean autoSave, java.util.Locale l)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.swing.JComponent` | `getEditor()` Get an component for editing .
    `void` | `goodBye()` Called when the editor provider is no longer used.
    `void` | `propertyChange(java.beans.PropertyChangeEvent evt)`
    `void` | `reset()` Reset the value in the editor to the basic value.
    `void` | `save()` Set the basic value from the editor.

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

      `getDescription, getLabel, getLabelText, getLabelTextWithPunctuation, getTitleText, getToolTipText, isValidValue`

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

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

- - ### Constructor Detail

    - #### EnumEditor

          public EnumEditor(@NotNull
                            SwingEnumProperty<E> property,
                            boolean autoSave,
                            java.util.Locale l)

      Constructor.
      Parameters:
        `property` - edited property
        `autoSave` - automatically save changed values?
        `l` - locale

  - ### Method Detail

    - #### propertyChange

          public void propertyChange(java.beans.PropertyChangeEvent evt)

      Specified by:
        `propertyChange` in interface `java.beans.PropertyChangeListener`

    - #### getEditor

          @NotNull
          public javax.swing.JComponent getEditor()

      Get an component for editing .
      Specified by:
        `getEditor` in interface `EditorProvider`
      Returns:
        editor component

    - #### reset

          public void reset()

      Reset the value in the editor to the basic value.
      Specified by:
        `reset` in interface `EditorProvider`

    - #### save

          public void save()

      Set the basic value from the editor.
      Specified by:
        `save` in interface `EditorProvider`

    - #### goodBye

          public void goodBye()

      Called when the editor provider is no longer used.
      Specified by:
        `goodBye` in interface `EditorProvider`