|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.awt
Class SystemColor

java.lang.Objectjava.awt.Color
java.awt.SystemColor
- All Implemented Interfaces:
- Paint, java.io.Serializable, Transparency
- public final class SystemColor
- extends Color
- implements java.io.Serializable
- extends Color
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.
- Since:
- 1.1
| 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. |
private static int[] |
colors
The internal array used to dynamically update getRGB(). |
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. |
private static long |
serialVersionUID
Compatible with JDK 1.1+. |
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 |
ALPHA_MASK, black, BLACK, blue, BLUE, context, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, value, white, WHITE, yellow, YELLOW |
| Fields inherited from interface java.awt.Transparency |
BITMASK, OPAQUE, TRANSLUCENT |
| Constructor Summary | |
private |
SystemColor(int id)
Construct a system color which is dynamically updated. |
| Method Summary | |
PaintContext |
createContext(java.awt.image.ColorModel cm,
Rectangle deviceBounds,
java.awt.geom.Rectangle2D userBounds,
java.awt.geom.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. |
java.lang.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 |
serialVersionUID
private static final long serialVersionUID
- Compatible with JDK 1.1+.
- See Also:
- Constant Field Values
DESKTOP
public static final int DESKTOP
- Array index of the desktop color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
desktop55 , Constant Field Values
ACTIVE_CAPTION
public static final int ACTIVE_CAPTION
- Array index of the active caption color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
activeCaption55 , Constant Field Values
ACTIVE_CAPTION_TEXT
public static final int ACTIVE_CAPTION_TEXT
- Array index of the active caption text color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
activeCaptionText55 , Constant Field Values
ACTIVE_CAPTION_BORDER
public static final int ACTIVE_CAPTION_BORDER
- Array index of the active caption border color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
activeCaptionBorder55 , Constant Field Values
INACTIVE_CAPTION
public static final int INACTIVE_CAPTION
- Array index of the inactive caption color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
inactiveCaption55 , Constant Field Values
INACTIVE_CAPTION_TEXT
public static final int INACTIVE_CAPTION_TEXT
- Array index of the inactive caption text color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
inactiveCaptionText55 , Constant Field Values
INACTIVE_CAPTION_BORDER
public static final int INACTIVE_CAPTION_BORDER
- Array index of the inactive caption border color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
inactiveCaptionBorder55 , Constant Field Values
WINDOW
public static final int WINDOW
- Array index of the window background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
window55 , Constant Field Values
WINDOW_BORDER
public static final int WINDOW_BORDER
- Array index of the window border color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
windowBorder55 , Constant Field Values
WINDOW_TEXT
public static final int WINDOW_TEXT
- Array index of the window text color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
windowText55 , Constant Field Values
MENU
public static final int MENU
- Array index of the menu background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
menu55 , Constant Field Values
MENU_TEXT
public static final int MENU_TEXT
- Array index of the menu text color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
menuText55 , Constant Field Values
TEXT
public static final int TEXT
- Array index of the text background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
text55 , Constant Field Values
TEXT_TEXT
public static final int TEXT_TEXT
- Array index of the text foreground color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
textText55 , Constant Field Values
TEXT_HIGHLIGHT
public static final int TEXT_HIGHLIGHT
- Array index of the highlighted text background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
textHighlight55 , Constant Field Values
TEXT_HIGHLIGHT_TEXT
public static final int TEXT_HIGHLIGHT_TEXT
- Array index of the highlighted text foreground color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
textHighlightText55 , Constant Field Values
TEXT_INACTIVE_TEXT
public static final int TEXT_INACTIVE_TEXT
- Array index of the inactive text foreground color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
textInactiveText55 , Constant Field Values
CONTROL
public static final int CONTROL
- Array index of the control background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
control55 , Constant Field Values
CONTROL_TEXT
public static final int CONTROL_TEXT
- Array index of the control text color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
controlText55 , Constant Field Values
CONTROL_HIGHLIGHT
public static final int CONTROL_HIGHLIGHT
- Array index of the highlighted control background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
controlHighlight55 , Constant Field Values
CONTROL_LT_HIGHLIGHT
public static final int CONTROL_LT_HIGHLIGHT
- Array index of the lightly highlighted control background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
controlLtHighlight55 , Constant Field Values
CONTROL_SHADOW
public static final int CONTROL_SHADOW
- Array index of the shadowed control background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
controlShadow55 , Constant Field Values
CONTROL_DK_SHADOW
public static final int CONTROL_DK_SHADOW
- Array index of the darkly shadowed control background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
controlDkShadow55 , Constant Field Values
SCROLLBAR
public static final int SCROLLBAR
- Array index of the scrollbar background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
scrollbar55 , Constant Field Values
INFO
public static final int INFO
- Array index of the info background color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
info55 , Constant Field Values
INFO_TEXT
public static final int INFO_TEXT
- Array index of the info text color. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
infoText55 , Constant Field Values
NUM_COLORS
public static final int NUM_COLORS
- The number of system colors. Used by
Toolkit.loadSystemColors(int[])55 .- See Also:
- Constant Field Values
colors
private static final int[] colors
- The internal array used to dynamically update
getRGB().
desktop
public static final SystemColor desktop
- The desktop color.
activeCaption
public static final SystemColor activeCaption
- The active caption background color.
activeCaptionText
public static final SystemColor activeCaptionText
- The active caption text color.
activeCaptionBorder
public static final SystemColor activeCaptionBorder
- The active caption border color.
inactiveCaption
public static final SystemColor inactiveCaption
- The inactive caption background color.
inactiveCaptionText
public static final SystemColor inactiveCaptionText
- The inactive caption text color.
inactiveCaptionBorder
public static final SystemColor inactiveCaptionBorder
- The inactive caption border color.
window
public static final SystemColor window
- The window background color.
windowBorder
public static final SystemColor windowBorder
- The window border color.
windowText
public static final SystemColor windowText
- The window text color.
menu
public static final SystemColor menu
- The menu background color.
menuText
public static final SystemColor menuText
- The menu text color.
text
public static final SystemColor text
- The text background color.
textText
public static final SystemColor textText
- The text foreground color.
textHighlight
public static final SystemColor textHighlight
- The highlighted text background color.
textHighlightText
public static final SystemColor textHighlightText
- The highlighted text foreground color.
textInactiveText
public static final SystemColor textInactiveText
- The inactive text color.
control
public static final SystemColor control
- The control background color.
controlText
public static final SystemColor controlText
- The control text color.
controlHighlight
public static final SystemColor controlHighlight
- The control highlight color.
controlLtHighlight
public static final SystemColor controlLtHighlight
- The control light highlight color.
controlShadow
public static final SystemColor controlShadow
- The control shadow color.
controlDkShadow
public static final SystemColor controlDkShadow
- The control dark shadow color.
scrollbar
public static final SystemColor scrollbar
- The scrollbar color.
info
public static final SystemColor info
- The info text background color.
infoText
public static final SystemColor infoText
- The info text foreground color.
| Constructor Detail |
SystemColor
private SystemColor(int id)
- Construct a system color which is dynamically updated.
| Method Detail |
getRGB
public int getRGB()
- Returns the RGB value for this color, in the sRGB color space. The blue
value will be in bits 0-7, green in 8-15, red in 6-23, and the alpha
value (bits 24-31) is 0xff. This is dynamically updated, so it may not
match the results of
getRed(),getGreen(), orgetBlue().
createContext
public PaintContext createContext(java.awt.image.ColorModel cm, Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, RenderingHints hints)
- Returns a paint context, used for filling areas of a raster scan with
the current value of this system color. Since the system colors may be
dynamically updated, the returned value may not always be the same; but
as the system color is solid, the context does not need any of the
passed parameters to do its job.
- Specified by:
createContextin interfacePaint- Overrides:
createContextin classColor
toString
public java.lang.String toString()
- Returns a string describing this color. This is in the format
"java.awt.SystemColor[i=" + index + ']', where index is one of the
integer constants of this class. Unfortunately, this description
does not describe the current value of the color; for that you should
use
new Color(syscolor.getRGB()).toString().
|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC