java.awt
public final class SystemColor extends Color implements Serializable
getRGB()
method is dynamic on systems
which support dynamic system color changes, and most methods in the
superclass are written to use this dynamic value when reporting colors.
However, the equals()
method is not dynamic, and does not
track the actual color of instances in this class. This means that equals
may give surprising results; you are better off relying on getRGB.
Since: 1.1
UNKNOWN: updated to 1.4
Field Summary | |
---|---|
static int | ACTIVE_CAPTION
Array index of the active caption color. |
static int | ACTIVE_CAPTION_BORDER
Array index of the active caption border color. |
static int | ACTIVE_CAPTION_TEXT
Array index of the active caption text color. |
static SystemColor | activeCaption The active caption background color. |
static SystemColor | activeCaptionBorder The active caption border color. |
static SystemColor | activeCaptionText The active caption text color. |
static SystemColor | control The control background color. |
static SystemColor | controlDkShadow The control dark shadow color. |
static SystemColor | controlHighlight The control highlight color. |
static SystemColor | controlLtHighlight The control light highlight color. |
static SystemColor | controlShadow The control shadow color. |
static SystemColor | controlText The control text color. |
static int | CONTROL
Array index of the control background color. |
static int | CONTROL_DK_SHADOW
Array index of the darkly shadowed control background color. |
static int | CONTROL_HIGHLIGHT
Array index of the highlighted control background color. |
static int | CONTROL_LT_HIGHLIGHT
Array index of the lightly highlighted control background color. |
static int | CONTROL_SHADOW
Array index of the shadowed control background color. |
static int | CONTROL_TEXT
Array index of the control text color. |
static SystemColor | desktop The desktop color. |
static int | DESKTOP
Array index of the desktop color. |
static SystemColor | inactiveCaption The inactive caption background color. |
static SystemColor | inactiveCaptionBorder The inactive caption border color. |
static SystemColor | inactiveCaptionText The inactive caption text color. |
static SystemColor | info The info text background color. |
static SystemColor | infoText The info text foreground color. |
static int | INACTIVE_CAPTION
Array index of the inactive caption color. |
static int | INACTIVE_CAPTION_BORDER
Array index of the inactive caption border color. |
static int | INACTIVE_CAPTION_TEXT
Array index of the inactive caption text color. |
static int | INFO
Array index of the info background color. |
static int | INFO_TEXT
Array index of the info text color. |
static SystemColor | menu The menu background color. |
static SystemColor | menuText The menu text color. |
static int | MENU
Array index of the menu background color. |
static int | MENU_TEXT
Array index of the menu text color. |
static int | NUM_COLORS
The number of system colors. |
static SystemColor | scrollbar The scrollbar color. |
static int | SCROLLBAR
Array index of the scrollbar background color. |
static SystemColor | text The text background color. |
static SystemColor | textHighlight The highlighted text background color. |
static SystemColor | textHighlightText The highlighted text foreground color. |
static SystemColor | textInactiveText The inactive text color. |
static SystemColor | textText The text foreground color. |
static int | TEXT
Array index of the text background color. |
static int | TEXT_HIGHLIGHT
Array index of the highlighted text background color. |
static int | TEXT_HIGHLIGHT_TEXT
Array index of the highlighted text foreground color. |
static int | TEXT_INACTIVE_TEXT
Array index of the inactive text foreground color. |
static int | TEXT_TEXT
Array index of the text foreground color. |
static SystemColor | window The window background color. |
static SystemColor | windowBorder The window border color. |
static SystemColor | windowText The window text color. |
static int | WINDOW
Array index of the window background color. |
static int | WINDOW_BORDER
Array index of the window border color. |
static int | WINDOW_TEXT
Array index of the window text color. |
Method Summary | |
---|---|
PaintContext | createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Returns a paint context, used for filling areas of a raster scan with
the current value of this system color. |
int | getRGB()
Returns the RGB value for this color, in the sRGB color space. |
String | toString()
Returns a string describing this color. |
See Also: activeCaption
See Also: activeCaptionBorder
See Also: activeCaptionText
See Also: control
See Also: controlDkShadow
See Also: controlHighlight
See Also: controlLtHighlight
See Also: controlShadow
See Also: controlText
See Also: desktop
See Also: inactiveCaption
See Also: inactiveCaptionBorder
See Also: inactiveCaptionText
See Also: info
See Also: infoText
See Also: menu
See Also: menuText
See Also: scrollbar
See Also: text
See Also: textHighlight
See Also: textHighlightText
See Also: textInactiveText
See Also: textText
See Also: window
See Also: windowBorder
See Also: windowText
Parameters: cm the requested color model deviceBounds the bounding box in device coordinates, ignored userBounds the bounding box in user coordinates, ignored xform the bounds transformation, ignored hints any rendering hints, ignored
Returns: a context for painting this solid color
getRed()
, getGreen()
, or
getBlue()
.
Returns: the current RGB value
new Color(syscolor.getRGB()).toString()
.
Returns: a string describing this color