Enum Class UIFactory.Colors

java.lang.Object
java.lang.Enum<UIFactory.Colors>
com.sun.javatest.tool.UIFactory.Colors
All Implemented Interfaces:
Serializable, Comparable<UIFactory.Colors>, Constable
Enclosing class:
UIFactory

public static enum UIFactory.Colors extends Enum<UIFactory.Colors>
  • Enum Constant Details

    • INPUT_INVALID

      public static final UIFactory.Colors INPUT_INVALID
      Color used for highlighting incorrect input fields
    • INPUT_VALID

      public static final UIFactory.Colors INPUT_VALID
      Color used for highlighting correct input fields
    • INPUT_DEFAULT

      public static final UIFactory.Colors INPUT_DEFAULT
      Default background color for input fields
    • SEPARATOR_FOREGROUND

      public static final UIFactory.Colors SEPARATOR_FOREGROUND
    • CONTROL_INFO

      public static final UIFactory.Colors CONTROL_INFO
    • CONTROL_SHADOW

      public static final UIFactory.Colors CONTROL_SHADOW
    • TEXT_HIGHLIGHT_COLOR

      public static final UIFactory.Colors TEXT_HIGHLIGHT_COLOR
    • TEXT_COLOR

      public static final UIFactory.Colors TEXT_COLOR
    • TEXT_SELECTED_COLOR

      public static final UIFactory.Colors TEXT_SELECTED_COLOR
    • WINDOW_BACKGROUND

      public static final UIFactory.Colors WINDOW_BACKGROUND
    • PRIMARY_CONTROL_HIGHLIGHT

      public static final UIFactory.Colors PRIMARY_CONTROL_HIGHLIGHT
    • PRIMARY_CONTROL_INFO

      public static final UIFactory.Colors PRIMARY_CONTROL_INFO
    • BUTTON_DISABLED_FOREGROUND

      public static final UIFactory.Colors BUTTON_DISABLED_FOREGROUND
    • PRIMARY_CONTROL_SHADOW

      public static final UIFactory.Colors PRIMARY_CONTROL_SHADOW
    • PRIMARY_CONTROL

      public static final UIFactory.Colors PRIMARY_CONTROL
    • PRIMARY_CONTROL_DARK_SHADOW

      public static final UIFactory.Colors PRIMARY_CONTROL_DARK_SHADOW
    • BLACK

      public static final UIFactory.Colors BLACK
    • TRANSPARENT

      public static final UIFactory.Colors TRANSPARENT
  • Method Details

    • values

      public static UIFactory.Colors[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UIFactory.Colors valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOfByPreferencesName

      public static UIFactory.Colors valueOfByPreferencesName(String prefsName)
      Find Colors by color preferences name.
      Parameters:
      prefsName - Color preferences name (e.g. "colors.input.default")
      Returns:
      Colors associated with such preferences name
      Throws:
      IllegalArgumentException - in case there is no Colors with such name
    • getColorByPreferencesName

      public static Color getColorByPreferencesName(String prefsName)
      Get Color by colors preferences name.
      Parameters:
      prefsName - Color preferences name (e.g. "colors.input.default")
      Returns:
      Color if Preferences contain this color. Returns default value if exists
      null otherwise
    • getColorsNames

      public static String[] getColorsNames()
      Get array with all colors names used in preferences
      Returns:
      Names array
    • decodeRGBA

      public static Color decodeRGBA(String color)
    • encodeARGB

      public static String encodeARGB(Color color)
    • isConfigurable

      public boolean isConfigurable()
    • getDefaultValue

      public String getDefaultValue()
      Getter for default String-encoded color value. Is used for Color.decode() and should be formatted similarly
      Returns:
      Default String-encoded color value
    • getValue

      public Color getValue()
      Getter for current color value. It is loaded from preferences if no color is set previously.
      Returns:
      Current color value
    • setValue

      public Color setValue(Color c)
      Setter for current color value.
      Returns:
      Old color value
    • getPreferencesName

      public String getPreferencesName()
      Get color name used in preferences file. It is formed from enum name. E.g. colors.input.invalid for INPUT_INVALID
      Returns:
      Color name used in preferences file
    • readColorFromPreferences

      public Color readColorFromPreferences()
      Read color value from preferences ignoring current color value that is returned by getValue();
      Returns:
      Color value from preferences file