java.lang.Objectjava.awt.Color
java.awt.SystemColor
public final class SystemColor
A class to encapsulate symbolic colors representing the color of native GUI objects on a system. For systems which support the dynamic update of the system colors (when the user changes the colors) the actual RGB values of these symbolic colors will also change dynamically. In order to compare the "current" RGB value of a SystemColor object with a non-symbolic Color object, getRGB should be used rather than equals.
Note that the way in which these system colors are applied to GUI objects may vary slightly from platform to platform since GUI objects may be rendered differently on each platform.
System color values may also be available through the getDesktopProperty method on java.awt.Toolkit.
Field Summary | |
---|---|
static int |
ACTIVE_CAPTION
The array index for the ![]() ![]() |
static int |
ACTIVE_CAPTION_BORDER
The array index for the ![]() ![]() |
static int |
ACTIVE_CAPTION_TEXT
The array index for the ![]() ![]() |
static SystemColor |
activeCaption
The color rendered for the window-title background of the currently active window. |
static SystemColor |
activeCaptionBorder
The color rendered for the border around the currently active window. |
static SystemColor |
activeCaptionText
The color rendered for the window-title text of the currently active window. |
static SystemColor |
control
The color rendered for the background of control panels and control objects, such as pushbuttons. |
static int |
CONTROL
The array index for the ![]() ![]() |
static int |
CONTROL_DK_SHADOW
The array index for the ![]() ![]() |
static int |
CONTROL_HIGHLIGHT
The array index for the ![]() ![]() |
static int |
CONTROL_LT_HIGHLIGHT
The array index for the ![]() ![]() |
static int |
CONTROL_SHADOW
The array index for the ![]() ![]() |
static int |
CONTROL_TEXT
The array index for the ![]() ![]() |
static SystemColor |
controlDkShadow
The color rendered for dark shadow areas on 3D control objects, such as pushbuttons. |
static SystemColor |
controlHighlight
The color rendered for light areas of 3D control objects, such as pushbuttons. |
static SystemColor |
controlLtHighlight
The color rendered for highlight areas of 3D control objects, such as pushbuttons. |
static SystemColor |
controlShadow
The color rendered for shadow areas of 3D control objects, such as pushbuttons. |
static SystemColor |
controlText
The color rendered for the text of control panels and control objects, such as pushbuttons. |
static SystemColor |
desktop
The color rendered for the background of the desktop. |
static int |
DESKTOP
The array index for the ![]() ![]() |
static int |
INACTIVE_CAPTION
The array index for the ![]() ![]() |
static int |
INACTIVE_CAPTION_BORDER
The array index for the ![]() ![]() |
static int |
INACTIVE_CAPTION_TEXT
The array index for the ![]() ![]() |
static SystemColor |
inactiveCaption
The color rendered for the window-title background of inactive windows. |
static SystemColor |
inactiveCaptionBorder
The color rendered for the border around inactive windows. |
static SystemColor |
inactiveCaptionText
The color rendered for the window-title text of inactive windows. |
static SystemColor |
info
The color rendered for the background of tooltips or spot help. |
static int |
INFO
The array index for the ![]() ![]() |
static int |
INFO_TEXT
The array index for the ![]() ![]() |
static SystemColor |
infoText
The color rendered for the text of tooltips or spot help. |
static SystemColor |
menu
The color rendered for the background of menus. |
static int |
MENU
The array index for the ![]() ![]() |
static int |
MENU_TEXT
The array index for the ![]() ![]() |
static SystemColor |
menuText
The color rendered for the text of menus. |
static int |
NUM_COLORS
The number of system colors in the array. |
static SystemColor |
scrollbar
The color rendered for the background of scrollbars. |
static int |
SCROLLBAR
The array index for the ![]() ![]() |
static SystemColor |
text
The color rendered for the background of text control objects, such as textfields and comboboxes. |
static int |
TEXT
The array index for the ![]() ![]() |
static int |
TEXT_HIGHLIGHT
The array index for the ![]() ![]() |
static int |
TEXT_HIGHLIGHT_TEXT
The array index for the ![]() ![]() |
static int |
TEXT_INACTIVE_TEXT
The array index for the ![]() ![]() |
static int |
TEXT_TEXT
The array index for the ![]() ![]() |
static SystemColor |
textHighlight
The color rendered for the background of selected items, such as in menus, comboboxes, and text. |
static SystemColor |
textHighlightText
The color rendered for the text of selected items, such as in menus, comboboxes, and text. |
static SystemColor |
textInactiveText
The color rendered for the text of inactive items, such as in menus. |
static SystemColor |
textText
The color rendered for the text of text control objects, such as textfields and comboboxes. |
static SystemColor |
window
The color rendered for the background of interior regions inside windows. |
static int |
WINDOW
The array index for the ![]() ![]() |
static int |
WINDOW_BORDER
The array index for the ![]() ![]() |
static int |
WINDOW_TEXT
The array index for the ![]() ![]() |
static SystemColor |
windowBorder
The color rendered for the border around interior regions inside windows. |
static SystemColor |
windowText
The color rendered for text of interior regions inside windows. |
Fields inherited from class java.awt. Color |
---|
black , BLACK , blue , BLUE , cyan , CYAN , DARK_GRAY , darkGray , gray , GRAY , green , GREEN , LIGHT_GRAY , lightGray , magenta , MAGENTA , orange , ORANGE , pink , PINK , red , RED , white , WHITE , yellow , YELLOW |
Fields inherited from interface java.awt. Transparency |
---|
BITMASK , OPAQUE , TRANSLUCENT |
Method Summary | |
---|---|
PaintContext |
createContext
(
ColorModel
cm,
Rectangle
r,
Rectangle2D
r2d,
AffineTransform
xform,
RenderingHints
hints) Creates and returns a PaintContext used to generate a solid color pattern. |
int |
getRGB
() Gets the "current" RGB value representing the symbolic color. |
String |
toString
() Returns a string representation of this Color's values. |
Methods inherited from class java.awt. Color |
---|
brighter , darker , decode , equals , getAlpha , getBlue , getColor , getColor , getColor , getColorComponents , getColorComponents , getColorSpace , getComponents , getComponents , getGreen , getHSBColor , getRed , getRGBColorComponents , getRGBComponents , getTransparency , hashCode , HSBtoRGB , RGBtoHSB |
Methods inherited from class java.lang. Object |
---|
clone , finalize , getClass , notify , notifyAll , wait , wait , wait |
Field Detail |
---|
public static final int DESKTOP
public static final int ACTIVE_CAPTION
public static final int ACTIVE_CAPTION_TEXT
public static final int ACTIVE_CAPTION_BORDER
public static final int INACTIVE_CAPTION
public static final int INACTIVE_CAPTION_TEXT
public static final int INACTIVE_CAPTION_BORDER
public static final int WINDOW
public static final int WINDOW_BORDER
public static final int WINDOW_TEXT
public static final int MENU
public static final int MENU_TEXT
public static final int TEXT
public static final int TEXT_TEXT
public static final int TEXT_HIGHLIGHT
public static final int TEXT_HIGHLIGHT_TEXT
public static final int TEXT_INACTIVE_TEXT
public static final int CONTROL
public static final int CONTROL_TEXT
public static final int CONTROL_HIGHLIGHT
public static final int CONTROL_LT_HIGHLIGHT
public static final int CONTROL_SHADOW
public static final int CONTROL_DK_SHADOW
public static final int SCROLLBAR
public static final int INFO
public static final int INFO_TEXT
public static final int NUM_COLORS
public static final SystemColor desktop
public static final SystemColor activeCaption
public static final SystemColor activeCaptionText
public static final SystemColor activeCaptionBorder
public static final SystemColor inactiveCaption
public static final SystemColor inactiveCaptionText
public static final SystemColor inactiveCaptionBorder
public static final SystemColor window
public static final SystemColor windowBorder
public static final SystemColor windowText
public static final SystemColor menu
public static final SystemColor menuText
public static final SystemColor text
public static final SystemColor textText
public static final SystemColor textHighlight
public static final SystemColor textHighlightText
public static final SystemColor textInactiveText
public static final SystemColor control
public static final SystemColor controlText
public static final SystemColor controlHighlight
public static final SystemColor controlLtHighlight
public static final SystemColor controlShadow
public static final SystemColor controlDkShadow
public static final SystemColor scrollbar
public static final SystemColor info
public static final SystemColor infoText
Method Detail |
---|
public int getRGB()
public PaintContext createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints)
public String toString()