Package docking.theme.gui

# Class ThemeValueEditor<T>

java.lang.Object
docking.theme.gui.ThemeValueEditor<T>

Type Parameters:
  `T` - the base property (Color, Font, or Icon)

Direct Known Subclasses:
  `ColorValueEditor`, `FontValueEditor`, `IconValueEditor`

public abstract class ThemeValueEditor<T> extends Object
Base class for Theme property Editors (Colors, Fonts, and Icons)

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ThemeValue<T>`
  `currentThemeValue`
  `protected PropertyEditor`
  `editor`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ThemeValueEditor(String typeName, PropertyChangeListener listener, PropertyEditor editor)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract ThemeValue<T>`
  `createNewThemeValue(String id, T newValue)`
  Factory method for creating the ThemeValue of the correct type.
  `void`
  `editValue(ThemeValue<T> themeValue)`
  Edits the ThemeValue by invoking the appropriate dialog for editing the type
  `protected abstract T`
  `getRawValue(String id)`
  Returns the actual value (Color, Font, or Icon)
  `protected void`
  `storeState()`
  Called when the user has pressed ok.

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

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

- ## Field Details

  - ### currentThemeValue

    protected ThemeValue<T> currentThemeValue

  - ### editor

    protected PropertyEditor editor

- ## Constructor Details

  - ### ThemeValueEditor

    protected ThemeValueEditor(String typeName, PropertyChangeListener listener, PropertyEditor editor)
    Constructor
    Parameters:
      `typeName` - the name of the type (Used in the dialog title)
      `listener` - the `PropertyChangeListener` to be notified for changes
      `editor` - the standard property editor for the type

- ## Method Details

  - ### editValue

    public void editValue(ThemeValue<T> themeValue)
    Edits the ThemeValue by invoking the appropriate dialog for editing the type
    Parameters:
      `themeValue` - the value to be edited

  - ### storeState

    protected void storeState()
    Called when the user has pressed ok. This allows sub-classes to store any state for future dialog invocations.

  - ### getRawValue

    protected abstract T getRawValue(String id)
    Returns the actual value (Color, Font, or Icon)
    Parameters:
      `id` - the theme property id for the value
    Returns:
      the current stored value for the id

  - ### createNewThemeValue

    protected abstract ThemeValue<T> createNewThemeValue(String id, T newValue)
    Factory method for creating the ThemeValue of the correct type.
    Parameters:
      `id` - the id for theme property
      `newValue` - the new value for the underlying type (Color, Font, or Icon)
    Returns:
      the new ThemeValue for the type