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 Details

  • 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