Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
java.awt.Color
java.awt.SystemColor
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 |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
static SystemColor |
|
Fields inherited from class java.awt.Color | |
BLACK , BLUE , CYAN , DARK_GRAY , GRAY , GREEN , LIGHT_GRAY , MAGENTA , ORANGE , PINK , RED , WHITE , YELLOW , black , blue , cyan , darkGray , gray , green , lightGray , magenta , orange , pink , red , white , yellow |
Fields inherited from interface java.awt.Transparency | |
BITMASK , OPAQUE , TRANSLUCENT |
Method Summary | |
PaintContext |
|
int |
|
String |
|
Methods inherited from class java.awt.Color | |
HSBtoRGB , RGBtoHSB , brighter , createContext , darker , decode , equals , getAlpha , getBlue , getColor , getColor , getColor , getColorComponents , getColorComponents , getColorSpace , getComponents , getComponents , getGreen , getHSBColor , getRGB , getRGBColorComponents , getRGBComponents , getRed , getTransparency , hashCode , toString |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public static final int ACTIVE_CAPTION
Array index of the active caption color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 1
- See Also:
activeCaption
public static final int ACTIVE_CAPTION_BORDER
Array index of the active caption border color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 3
- See Also:
activeCaptionBorder
public static final int ACTIVE_CAPTION_TEXT
Array index of the active caption text color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 2
- See Also:
activeCaptionText
public static final int CONTROL
Array index of the control background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 17
- See Also:
control
public static final int CONTROL_DK_SHADOW
Array index of the darkly shadowed control background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 22
- See Also:
controlDkShadow
public static final int CONTROL_HIGHLIGHT
Array index of the highlighted control background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 19
- See Also:
controlHighlight
public static final int CONTROL_LT_HIGHLIGHT
Array index of the lightly highlighted control background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 20
- See Also:
controlLtHighlight
public static final int CONTROL_SHADOW
Array index of the shadowed control background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 21
- See Also:
controlShadow
public static final int CONTROL_TEXT
Array index of the control text color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 18
- See Also:
controlText
public static final int DESKTOP
Array index of the desktop color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 0
- See Also:
desktop
public static final int INACTIVE_CAPTION
Array index of the inactive caption color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 4
- See Also:
inactiveCaption
public static final int INACTIVE_CAPTION_BORDER
Array index of the inactive caption border color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 6
- See Also:
inactiveCaptionBorder
public static final int INACTIVE_CAPTION_TEXT
Array index of the inactive caption text color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 5
- See Also:
inactiveCaptionText
public static final int INFO
Array index of the info background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 24
- See Also:
info
public static final int INFO_TEXT
Array index of the info text color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 25
- See Also:
infoText
public static final int MENU
Array index of the menu background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 10
- See Also:
menu
public static final int MENU_TEXT
Array index of the menu text color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 11
- See Also:
menuText
public static final int NUM_COLORS
The number of system colors. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 26
public static final int SCROLLBAR
Array index of the scrollbar background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 23
- See Also:
scrollbar
public static final int TEXT
Array index of the text background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 12
- See Also:
text
public static final int TEXT_HIGHLIGHT
Array index of the highlighted text background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 14
- See Also:
textHighlight
public static final int TEXT_HIGHLIGHT_TEXT
Array index of the highlighted text foreground color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 15
- See Also:
textHighlightText
public static final int TEXT_INACTIVE_TEXT
Array index of the inactive text foreground color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 16
- See Also:
textInactiveText
public static final int TEXT_TEXT
Array index of the text foreground color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 13
- See Also:
textText
public static final int WINDOW
Array index of the window background color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 7
- See Also:
window
public static final int WINDOW_BORDER
Array index of the window border color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 8
- See Also:
windowBorder
public static final int WINDOW_TEXT
Array index of the window text color. Used byToolkit.loadSystemColors(int[])
.
- Field Value:
- 9
- See Also:
windowText
public static final SystemColor activeCaptionBorder
The active caption border color.
public static final SystemColor controlLtHighlight
The control light highlight color.
public static final SystemColor inactiveCaption
The inactive caption background color.
public static final SystemColor inactiveCaptionBorder
The inactive caption border color.
public static final SystemColor inactiveCaptionText
The inactive caption text color.
public static final SystemColor textHighlightText
The highlighted text foreground color.
public 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. 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:
- createContext in interface Paint
- Overrides:
- createContext in interface Color
- Parameters:
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
- Returns:
- a context for painting this solid color
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 ofgetRed()
,getGreen()
, orgetBlue()
.
- Returns:
- the current RGB value
public 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 usenew Color(syscolor.getRGB()).toString()
.
- Returns:
- a string describing this color