Package com.sun.javatest.tool
Enum Class UIFactory.Colors
- All Implemented Interfaces:
Serializable
,Comparable<UIFactory.Colors>
,Constable
- Enclosing class:
UIFactory
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault background color for input fieldsColor used for highlighting incorrect input fieldsColor used for highlighting correct input fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Color
decodeRGBA
(String color) static String
encodeARGB
(Color color) static Color
getColorByPreferencesName
(String prefsName) Get Color by colors preferences name.static String[]
Get array with all colors names used in preferencesGetter for default String-encoded color value.Get color name used in preferences file.getValue()
Getter for current color value.boolean
Read color value from preferences ignoring current color value that is returned by getValue();Setter for current color value.static UIFactory.Colors
Returns the enum constant of this class with the specified name.static UIFactory.Colors
valueOfByPreferencesName
(String prefsName) Find Colors by color preferences name.static UIFactory.Colors[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INPUT_INVALID
Color used for highlighting incorrect input fields -
INPUT_VALID
Color used for highlighting correct input fields -
INPUT_DEFAULT
Default background color for input fields -
MENU_BACKGROUND
-
SEPARATOR_FOREGROUND
-
CONTROL_INFO
-
CONTROL_SHADOW
-
TEXT_HIGHLIGHT_COLOR
-
TEXT_COLOR
-
TEXT_SELECTED_COLOR
-
WINDOW_BACKGROUND
-
PRIMARY_CONTROL_HIGHLIGHT
-
PRIMARY_CONTROL_INFO
-
BUTTON_DISABLED_FOREGROUND
-
PRIMARY_CONTROL_SHADOW
-
PRIMARY_CONTROL
-
PRIMARY_CONTROL_DARK_SHADOW
-
BLACK
-
TRANSPARENT
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
valueOfByPreferencesName
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
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
Get array with all colors names used in preferences- Returns:
- Names array
-
decodeRGBA
-
encodeARGB
-
isConfigurable
public boolean isConfigurable() -
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
Getter for current color value. It is loaded from preferences if no color is set previously.- Returns:
- Current color value
-
setValue
Setter for current color value.- Returns:
- Old color value
-
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
Read color value from preferences ignoring current color value that is returned by getValue();- Returns:
- Color value from preferences file
-