|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Color
java.awt.SystemColor
public final class SystemColor
This class contains the various "system colors" in use by the native
windowing system. The 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.
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 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 |
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 SystemColor |
desktop
The desktop color. |
static int |
DESKTOP
Array index of the desktop 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 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 int |
INFO
Array index of the info background color. |
static int |
INFO_TEXT
Array index of the info text color. |
static SystemColor |
infoText
The info text foreground color. |
static SystemColor |
menu
The menu background color. |
static int |
MENU
Array index of the menu background color. |
static int |
MENU_TEXT
Array index of the menu text color. |
static SystemColor |
menuText
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 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 |
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 SystemColor |
window
The window background 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. |
static SystemColor |
windowBorder
The window border color. |
static SystemColor |
windowText
The window text color. |
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 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. |
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
Toolkit.loadSystemColors(int[])
.
desktop
,
Constant Field Valuespublic static final int ACTIVE_CAPTION
Toolkit.loadSystemColors(int[])
.
activeCaption
,
Constant Field Valuespublic static final int ACTIVE_CAPTION_TEXT
Toolkit.loadSystemColors(int[])
.
activeCaptionText
,
Constant Field Valuespublic static final int ACTIVE_CAPTION_BORDER
Toolkit.loadSystemColors(int[])
.
activeCaptionBorder
,
Constant Field Valuespublic static final int INACTIVE_CAPTION
Toolkit.loadSystemColors(int[])
.
inactiveCaption
,
Constant Field Valuespublic static final int INACTIVE_CAPTION_TEXT
Toolkit.loadSystemColors(int[])
.
inactiveCaptionText
,
Constant Field Valuespublic static final int INACTIVE_CAPTION_BORDER
Toolkit.loadSystemColors(int[])
.
inactiveCaptionBorder
,
Constant Field Valuespublic static final int WINDOW
Toolkit.loadSystemColors(int[])
.
window
,
Constant Field Valuespublic static final int WINDOW_BORDER
Toolkit.loadSystemColors(int[])
.
windowBorder
,
Constant Field Valuespublic static final int WINDOW_TEXT
Toolkit.loadSystemColors(int[])
.
windowText
,
Constant Field Valuespublic static final int MENU
Toolkit.loadSystemColors(int[])
.
menu
,
Constant Field Valuespublic static final int MENU_TEXT
Toolkit.loadSystemColors(int[])
.
menuText
,
Constant Field Valuespublic static final int TEXT
Toolkit.loadSystemColors(int[])
.
text
,
Constant Field Valuespublic static final int TEXT_TEXT
Toolkit.loadSystemColors(int[])
.
textText
,
Constant Field Valuespublic static final int TEXT_HIGHLIGHT
Toolkit.loadSystemColors(int[])
.
textHighlight
,
Constant Field Valuespublic static final int TEXT_HIGHLIGHT_TEXT
Toolkit.loadSystemColors(int[])
.
textHighlightText
,
Constant Field Valuespublic static final int TEXT_INACTIVE_TEXT
Toolkit.loadSystemColors(int[])
.
textInactiveText
,
Constant Field Valuespublic static final int CONTROL
Toolkit.loadSystemColors(int[])
.
control
,
Constant Field Valuespublic static final int CONTROL_TEXT
Toolkit.loadSystemColors(int[])
.
controlText
,
Constant Field Valuespublic static final int CONTROL_HIGHLIGHT
Toolkit.loadSystemColors(int[])
.
controlHighlight
,
Constant Field Valuespublic static final int CONTROL_LT_HIGHLIGHT
Toolkit.loadSystemColors(int[])
.
controlLtHighlight
,
Constant Field Valuespublic static final int CONTROL_SHADOW
Toolkit.loadSystemColors(int[])
.
controlShadow
,
Constant Field Valuespublic static final int CONTROL_DK_SHADOW
Toolkit.loadSystemColors(int[])
.
controlDkShadow
,
Constant Field Valuespublic static final int SCROLLBAR
Toolkit.loadSystemColors(int[])
.
scrollbar
,
Constant Field Valuespublic static final int INFO
Toolkit.loadSystemColors(int[])
.
info
,
Constant Field Valuespublic static final int INFO_TEXT
Toolkit.loadSystemColors(int[])
.
infoText
,
Constant Field Valuespublic static final int NUM_COLORS
Toolkit.loadSystemColors(int[])
.
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()
getRed()
, getGreen()
, or
getBlue()
.
getRGB
in class Color
ColorModel.getRGBdefault()
,
Color.getRed()
,
Color.getGreen()
,
Color.getBlue()
,
Color.getAlpha()
public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
createContext
in interface Paint
createContext
in class Color
cm
- the requested color modeldeviceBounds
- the bounding box in device coordinates, ignoreduserBounds
- the bounding box in user coordinates, ignoredxform
- the bounds transformation, ignoredhints
- any rendering hints, ignored
public String toString()
new Color(syscolor.getRGB()).toString()
.
toString
in class Color
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |