java.awt
Class SystemColor
- java.lang.Object
-
- java.awt.Color
-
- java.awt.SystemColor
-
- All Implemented Interfaces:
- Paint, Transparency, java.io.Serializable
public final class SystemColor extends Color implements java.io.SerializableA 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 aSystemColor
object with a non-symbolic Color object,getRGB
should be used rather thanequals
.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 onjava.awt.Toolkit
.
-
-
Fields Modifier and Type Field and Description ACTIVE_CAPTION The array index for theactiveCaption
system color.ACTIVE_CAPTION_BORDER The array index for theactiveCaptionBorder
system color.ACTIVE_CAPTION_TEXT The array index for theactiveCaptionText
system color.activeCaption The color rendered for the window-title background of the currently active window.activeCaptionBorder The color rendered for the border around the currently active window.activeCaptionText The color rendered for the window-title text of the currently active window.BITMASK Represents image data that is guaranteed to be either completely opaque, with an alpha value of 1.0, or completely transparent, with an alpha value of 0.0.black The color black.BLACK The color black.blue The color blue.BLUE The color blue.control The color rendered for the background of control panels and control objects, such as pushbuttons.CONTROL The array index for thecontrol
system color.CONTROL_DK_SHADOW The array index for thecontrolDkShadow
system color.CONTROL_HIGHLIGHT The array index for thecontrolHighlight
system color.CONTROL_LT_HIGHLIGHT The array index for thecontrolLtHighlight
system color.CONTROL_SHADOW The array index for thecontrolShadow
system color.CONTROL_TEXT The array index for thecontrolText
system color.controlDkShadow The color rendered for dark shadow areas on 3D control objects, such as pushbuttons.controlHighlight The color rendered for light areas of 3D control objects, such as pushbuttons.controlLtHighlight The color rendered for highlight areas of 3D control objects, such as pushbuttons.controlShadow The color rendered for shadow areas of 3D control objects, such as pushbuttons.controlText The color rendered for the text of control panels and control objects, such as pushbuttons.cyan The color cyan.CYAN The color cyan.DARK_GRAY The color dark gray.darkGray The color dark gray.desktop The color rendered for the background of the desktop.DESKTOP The array index for thedesktop
system color.gray The color gray.GRAY The color gray.green The color green.GREEN The color green.INACTIVE_CAPTION The array index for theinactiveCaption
system color.INACTIVE_CAPTION_BORDER The array index for theinactiveCaptionBorder
system color.INACTIVE_CAPTION_TEXT The array index for theinactiveCaptionText
system color.inactiveCaption The color rendered for the window-title background of inactive windows.inactiveCaptionBorder The color rendered for the border around inactive windows.inactiveCaptionText The color rendered for the window-title text of inactive windows.info The color rendered for the background of tooltips or spot help.INFO The array index for theinfo
system color.INFO_TEXT The array index for theinfoText
system color.infoText The color rendered for the text of tooltips or spot help.LIGHT_GRAY The color light gray.lightGray The color light gray.magenta The color magenta.MAGENTA The color magenta.menu The color rendered for the background of menus.MENU The array index for themenu
system color.MENU_TEXT The array index for themenuText
system color.menuText The color rendered for the text of menus.NUM_COLORS The number of system colors in the array.OPAQUE Represents image data that is guaranteed to be completely opaque, meaning that all pixels have an alpha value of 1.0.orange The color orange.ORANGE The color orange.pink The color pink.PINK The color pink.red The color red.RED The color red.scrollbar The color rendered for the background of scrollbars.SCROLLBAR The array index for thescrollbar
system color.text The color rendered for the background of text control objects, such as textfields and comboboxes.TEXT The array index for thetext
system color.TEXT_HIGHLIGHT The array index for thetextHighlight
system color.TEXT_HIGHLIGHT_TEXT The array index for thetextHighlightText
system color.TEXT_INACTIVE_TEXT The array index for thetextInactiveText
system color.TEXT_TEXT The array index for thetextText
system color.textHighlight The color rendered for the background of selected items, such as in menus, comboboxes, and text.textHighlightText The color rendered for the text of selected items, such as in menus, comboboxes, and text.textInactiveText The color rendered for the text of inactive items, such as in menus.textText The color rendered for the text of text control objects, such as textfields and comboboxes.TRANSLUCENT Represents image data that contains or might contain arbitrary alpha values between and including 0.0 and 1.0.white The color white.WHITE The color white.window The color rendered for the background of interior regions inside windows.WINDOW The array index for thewindow
system color.WINDOW_BORDER The array index for thewindowBorder
system color.WINDOW_TEXT The array index for thewindowText
system color.windowBorder The color rendered for the border around interior regions inside windows.windowText The color rendered for text of interior regions inside windows.yellow The color yellow.YELLOW The color yellow.
-
Static Methods Modifier and Type Static Method and Description decode Converts aString
to an integer and returns the specified opaqueColor
.getColor Finds a color in the system properties.getColor Finds a color in the system properties.getColor Finds a color in the system properties.getHSBColor Creates aColor
object based on the specified values for the HSB color model.HSBtoRGB Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model.RGBtoHSB Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model.
-
Methods Modifier and Type Method and Description brighter Creates a newColor
that is a brighter version of thisColor
.createContext Creates and returns aPaintContext
used to generate a solid color field pattern.darker Creates a newColor
that is a darker version of thisColor
.equals Determines whether another object is equal to thisColor
.getAlpha Returns the alpha component in the range 0-255.getBlue Returns the blue component in the range 0-255 in the default sRGB space.getColorComponents Returns afloat
array containing only the color components of theColor
in theColorSpace
specified by thecspace
parameter.getColorComponents Returns afloat
array containing only the color components of theColor
, in theColorSpace
of theColor
.getColorSpace Returns theColorSpace
of thisColor
.getComponents Returns afloat
array containing the color and alpha components of theColor
, in theColorSpace
specified by thecspace
parameter.getComponents Returns afloat
array containing the color and alpha components of theColor
, in theColorSpace
of theColor
.getGreen Returns the green component in the range 0-255 in the default sRGB space.getRed Returns the red component in the range 0-255 in the default sRGB space.getRGB Returns the RGB value representing the color in the default sRGBColorModel
.getRGBColorComponents Returns afloat
array containing only the color components of theColor
, in the default sRGB color space.getRGBComponents Returns afloat
array containing the color and alpha components of theColor
, as represented in the default sRGB color space.getTransparency Returns the transparency mode for thisColor
.hashCode Computes the hash code for thisColor
.toString Returns a string representation of thisColor
's values.
-