de.caff.util.settings.swing

## Class EditablePropertyGroup<T extends EditableProperty>

- java.lang.Object
- - de.caff.util.settings.swing.EditablePropertyGroup<T>

- Type Parameters:
    `T` - editable property type
  All Implemented Interfaces:
    ChangeableItem, EditableProperty
  Direct Known Subclasses:
    EditablePreferenceGroup

      public class EditablePropertyGroup<T extends EditableProperty>
      extends java.lang.Object
      implements EditableProperty

  A group of editable properties.
  Author:
    Rammi

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `nameTag` The common title for the collected preference properties.
    `protected java.util.Collection<T>` | `propertyList` A collection of `EditableProperty` elements.
    `protected boolean` | `tabbed` Are there tabs to create for each added property?

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EditablePropertyGroup(java.lang.String nameTag, boolean tabbed)` Create a preference group.
    `EditablePropertyGroup(java.lang.String nameTag, boolean tabbed, java.util.Collection<? extends T> properties)` Create a preference group.
    `EditablePropertyGroup(java.lang.String nameTag, boolean tabbed, T... properties)` Create a preference group.
    `EditablePropertyGroup(java.lang.String nameTag, java.util.Collection<? extends T> properties)` Create a preference group.
    `EditablePropertyGroup(java.lang.String nameTag, T... properties)` Create a preference group.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addProperty(T property)` Add a property to the preference list.
    `void` | `addValueChangeListener(java.beans.PropertyChangeListener listener)` Add a listener which will be called for all value changes.
    `void` | `addValueChangeListenerWeakly(java.beans.PropertyChangeListener listener)` Add a listener which will be called for all value changes.
    `EditorProvider` | `getEditorProvider(java.util.Locale l)` Get the editor component for editing this preference property.
    `java.lang.String` | `getName(java.util.Locale l)` Get a common title for the editor components.
    `(package private) java.lang.String` | `getNameTag()` Get the i18n name tag.
    `(package private) int` | `getTabIndex()` Get the tab pos.
    `(package private) java.util.Iterator<T>` | `propertyIterator()` Get an iterator over the collected properties.
    `void` | `removeValueChangeListener(java.beans.PropertyChangeListener listener)` Remove a listener which will be called for all value changes.
    `void` | `removeValueChangeListenerWeakly(java.beans.PropertyChangeListener listener)` Remove a listener which will be called for all value changes.
    `(package private) void` | `setTabIndex(int tabIndex)` Set the tab position.

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

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

- - ### Field Detail

    - #### propertyList

          protected final java.util.Collection<T extends EditableProperty> propertyList

      A collection of `EditableProperty` elements.

    - #### nameTag

          protected final java.lang.String nameTag

      The common title for the collected preference properties.

    - #### tabbed

          protected final boolean tabbed

      Are there tabs to create for each added property?

  - ### Constructor Detail

    - #### EditablePropertyGroup

          public EditablePropertyGroup(@NotNull
                                       java.lang.String nameTag,
                                       boolean tabbed)

      Create a preference group.
      Parameters:
        `nameTag` - the name tag
        `tabbed` - are there tabs to create for each added property?

    - #### EditablePropertyGroup

          @SafeVarargs
          public EditablePropertyGroup(@NotNull
                                                    java.lang.String nameTag,
                                                    T... properties)

      Create a preference group. This group is not tabbed.
      Parameters:
        `nameTag` - the name tag
        `properties` - preferences to collect in this group

    - #### EditablePropertyGroup

          @SafeVarargs
          public EditablePropertyGroup(@NotNull
                                                    java.lang.String nameTag,
                                                    boolean tabbed,
                                                    T... properties)

      Create a preference group.
      Parameters:
        `nameTag` - the name tag
        `tabbed` - are there tabs to create for each added property?
        `properties` - preferences to collect in this group

    - #### EditablePropertyGroup

          public EditablePropertyGroup(@NotNull
                                       java.lang.String nameTag,
                                       @NotNull
                                       java.util.Collection<? extends T> properties)

      Create a preference group. This group is not tabbed.
      Parameters:
        `nameTag` - the name tag
        `properties` - preferences to collect in this group

    - #### EditablePropertyGroup

          public EditablePropertyGroup(@NotNull
                                       java.lang.String nameTag,
                                       boolean tabbed,
                                       @NotNull
                                       java.util.Collection<? extends T> properties)

      Create a preference group.
      Parameters:
        `nameTag` - the name tag
        `tabbed` - are there tabs to create for each added property?
        `properties` - preferences to collect in this group

  - ### Method Detail

    - #### getEditorProvider

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

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

    - #### getName

          @Nullable
          public java.lang.String getName(@Nullable
                                                    java.util.Locale l)

      Get a common title for the editor components. This will be displayed in a titled border around the components. It's okay to return nothing especially if `getEditorProvider(java.util.Locale)` does return only 1 editor component.
      Specified by:
        `getName` in interface `EditableProperty`
      Parameters:
        `l` - locale used for i18n
      Returns:
        common title or `null`

    - #### getNameTag

          @NotNull
          java.lang.String getNameTag()

      Get the i18n name tag.
      Returns:
        name tag

    - #### propertyIterator

          java.util.Iterator<T> propertyIterator()

      Get an iterator over the collected properties.
      Returns:
        property iterator

    - #### addValueChangeListener

          public void addValueChangeListener(@NotNull
                                             java.beans.PropertyChangeListener listener)

      Add a listener which will be called for all value changes.
      Specified by:
        `addValueChangeListener` in interface `ChangeableItem`
      Parameters:
        `listener` - value change listener to add

    - #### removeValueChangeListener

          public void removeValueChangeListener(@NotNull
                                                java.beans.PropertyChangeListener listener)

      Remove a listener which will be called for all value changes.
      Specified by:
        `removeValueChangeListener` in interface `ChangeableItem`
      Parameters:
        `listener` - value change listener to remove

    - #### addValueChangeListenerWeakly

          public void addValueChangeListenerWeakly(@NotNull
                                                   java.beans.PropertyChangeListener listener)

      Add a listener which will be called for all value changes.
      Specified by:
        `addValueChangeListenerWeakly` in interface `ChangeableItem`
      Parameters:
        `listener` - value change listener to add
      See Also:
        `ChangeableItem.addValueChangeListener(java.beans.PropertyChangeListener)`

    - #### removeValueChangeListenerWeakly

          public void removeValueChangeListenerWeakly(@NotNull
                                                      java.beans.PropertyChangeListener listener)

      Remove a listener which will be called for all value changes.
      Specified by:
        `removeValueChangeListenerWeakly` in interface `ChangeableItem`
      Parameters:
        `listener` - value change listener to remove
      See Also:
        `ChangeableItem.removeValueChangeListener(java.beans.PropertyChangeListener)`

    - #### addProperty

          protected void addProperty(@NotNull
                                     T property)

      Add a property to the preference list.

      Note that listeners added before are not automatically added to the new property.

      Parameters:
        `property` - property to add

    - #### getTabIndex

          int getTabIndex()

      Get the tab pos.
      Returns:
        selected tab position

    - #### setTabIndex

          void setTabIndex(int tabIndex)

      Set the tab position.
      Parameters:
        `tabIndex` - tab position index