Package com.sun.javatest.tool
Class I18NUtils
java.lang.Object
com.sun.javatest.tool.I18NUtils
Utility class to get general internationalization properties and
perform general transformations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A convenience redefinition ofStatus.ERROR
.static final int
A convenience redefinition ofStatus.FAILED
.static final int
A constant indicating that an icon should be represented as "filtered out".static final int
A convenience redefinition ofStatus.NOT_RUN
.static final int
A constant indicating the number of different value "state" values.static final int
A convenience redefinition ofStatus.PASSED
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Color
getStatusBarColor
(int status) Get the color for a bar for a test status.static Color
getStatusColor
(int status) Get the base color for a test status.static String
getStatusMessage
(Status status) Get localized version of the message string.static String
getStatusString
(int status) Get the localized status string for a particular test status.static Color
Create a color derived from the given color, but lighter.
-
Field Details
-
PASSED
public static final int PASSEDA convenience redefinition ofStatus.PASSED
.- See Also:
-
FAILED
public static final int FAILEDA convenience redefinition ofStatus.FAILED
.- See Also:
-
ERROR
public static final int ERRORA convenience redefinition ofStatus.ERROR
.- See Also:
-
NOT_RUN
public static final int NOT_RUNA convenience redefinition ofStatus.NOT_RUN
.- See Also:
-
FILTERED_OUT
public static final int FILTERED_OUTA constant indicating that an icon should be represented as "filtered out".- See Also:
-
NUM_STATES
public static final int NUM_STATESA constant indicating the number of different value "state" values.- See Also:
-
-
Constructor Details
-
I18NUtils
public I18NUtils()
-
-
Method Details
-
getStatusColor
Get the base color for a test status. -
getStatusBarColor
Get the color for a bar for a test status. -
getStatusString
Get the localized status string for a particular test status. -
getStatusMessage
Get localized version of the message string. This includes a localized version of the status (e.g. "Passed") and the raw status message.- Parameters:
status
- The status object for format. May not be null.- Returns:
- A formatted, internationalized string representation of the status object (state and reason).
- See Also:
-
lighter
Create a color derived from the given color, but lighter. This is currently done by decreasing it's saturation and brightness.- Parameters:
c
- The color to lighten.- Returns:
- The derived color.
-