所有类


java.awt
类 SystemColor

java.lang.Object
  继承者 java.awt.Color
      继承者 java.awt.SystemColor
所有已实现的接口:
Paint, Transparency, Serializable

public final class SystemColor
   
   
   
   
   
extends Color
implements Serializable

封装表示系统中本机 GUI 对象颜色的象征性颜色的类。对于支持系统颜色动态更新的系统而言(当用户更改颜色时),这些象征性颜色的实际 RGB 值也将发生动态更改。要比较 SystemColor 对象的“当前”RGB 值与非象征性 Color 对象,应该使用 getRGB,而不是 equals

注意,因为 GUI 对象在每个平台上的呈现可能各不相同,所以从平台到平台,这些系统颜色应用于 GUI 对象的方式可能也会稍有不同。

通过 java.awt.Toolkit 上的 getDesktopProperty 方法也可以使用系统颜色值。

另请参见:
Toolkit.getDesktopProperty(java.lang.String), 序列化表格

字段摘要
static intACTIVE_CAPTION
          activeCaption 系统颜色的数组索引。
static intACTIVE_CAPTION_BORDER
          activeCaptionBorder 系统颜色的数组索引。
static intACTIVE_CAPTION_TEXT
          activeCaptionText 系统颜色的数组索引。
static SystemColoractiveCaption
          为当前活动窗口的窗口标题提供的背景色。
static SystemColoractiveCaptionBorder
          为当前活动窗口的边框提供的颜色。
static SystemColoractiveCaptionText
          为当前活动窗口的窗口标题文本提供的颜色。
static SystemColorcontrol
          为控制面板和控制对象(比如按钮)提供的颜色。
static intCONTROL
          control 系统颜色的数组索引。
static intCONTROL_DK_SHADOW
          controlDkShadow 系统颜色的数组索引。
static intCONTROL_HIGHLIGHT
          controlHighlight 系统颜色的数组索引。
static intCONTROL_LT_HIGHLIGHT
          controlLtHighlight 系统颜色的数组索引。
static intCONTROL_SHADOW
          controlShadow 系统颜色的数组索引。
static intCONTROL_TEXT
          controlText 系统颜色的数组索引。
static SystemColorcontrolDkShadow
          为 3D 控制对象(比如按钮)的加黑阴影区域提供的颜色。
static SystemColorcontrolHighlight
          为 3D 控制对象(比如按钮)的亮区提供的颜色。
static SystemColorcontrolLtHighlight
          为 3D 控制对象(比如按钮)的高亮区域提供的颜色。
static SystemColorcontrolShadow
          为 3D 控制对象(比如按钮)的阴影区域提供的颜色。
static SystemColorcontrolText
          为控制面板和控制对象(比如按钮)的文本提供的颜色。
static SystemColordesktop
          为桌面背景提供的颜色。
static intDESKTOP
          desktop 系统颜色的数组索引。
static intINACTIVE_CAPTION
          inactiveCaption 系统颜色的数组索引。
static intINACTIVE_CAPTION_BORDER
          inactiveCaptionBorder 系统颜色的数组索引。
static intINACTIVE_CAPTION_TEXT
          inactiveCaptionText 系统颜色的数组索引。
static SystemColorinactiveCaption
          为非活动窗口的窗口标题提供的背景色。
static SystemColorinactiveCaptionBorder
          为非活动窗口的边框提供的颜色。
static SystemColorinactiveCaptionText
          为非活动窗口的窗口标题文本提供的颜色。
static SystemColorinfo
          为工具栏提示或定点帮助提供的背景色。
static intINFO
          info 系统颜色的数组索引。
static intINFO_TEXT
          infoText 系统颜色的数组索引。
static SystemColorinfoText
          为工具栏提示或定点帮助的文本提供的颜色。
static SystemColormenu
          为菜单提供的背景色。
static intMENU
          menu 系统颜色的数组索引。
static intMENU_TEXT
          menuText 系统颜色的数组索引。
static SystemColormenuText
          为菜单文本提供的颜色。
static intNUM_COLORS
          数组中系统颜色的数量。
static SystemColorscrollbar
          为滚动条提供的背景色。
static intSCROLLBAR
          scrollbar 系统颜色的数组索引。
static SystemColortext
          为文本控制对象(比如文本字段和组合框)提供的背景色。
static intTEXT
          text 系统颜色的数组索引。
static intTEXT_HIGHLIGHT
          textHighlight 系统颜色的数组索引。
static intTEXT_HIGHLIGHT_TEXT
          textHighlightText 系统颜色的数组索引。
static intTEXT_INACTIVE_TEXT
          textInactiveText 系统颜色的数组索引。
static intTEXT_TEXT
          textText 系统颜色的数组索引。
static SystemColortextHighlight
          为选则项(比如菜单、组合框和文本)提供的背景色。
static SystemColortextHighlightText
          为选则项(比如菜单、组合框和文本)的文本提供的颜色。
static SystemColortextInactiveText
          为非活动项(比如菜单中的项)的文本提供的颜色。
static SystemColortextText
          为文本控制对象(比如文本字段和组合框)的文本提供的颜色。
static SystemColorwindow
          为窗口的内部区域提供的背景色。
static intWINDOW
          window 系统颜色的数组索引。
static intWINDOW_BORDER
          windowBorder 系统颜色的数组索引。
static intWINDOW_TEXT
          windowText 系统颜色的数组索引。
static SystemColorwindowBorder
          为窗口内部区域的边框提供的颜色。
static SystemColorwindowText
          为窗口内部区域的文本提供的颜色。
 
从类 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
 
从接口 java.awt.Transparency 继承的字段
BITMASK, OPAQUE, TRANSLUCENT
 
方法摘要
 PaintContextcreateContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints)
          创建并返回用来生成纯色模式的 PaintContext
 intgetRGB()
          获取表示象征性颜色的“当前”RGB 值。
 StringtoString()
          返回此 Color 值的字符串表示形式。
 
从类 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
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

字段详细信息

DESKTOP

public static final int DESKTOP
desktop 系统颜色的数组索引。

另请参见:
desktop, 常量字段值

ACTIVE_CAPTION

public static final int ACTIVE_CAPTION
activeCaption 系统颜色的数组索引。

另请参见:
activeCaption, 常量字段值

ACTIVE_CAPTION_TEXT

public static final int ACTIVE_CAPTION_TEXT
activeCaptionText 系统颜色的数组索引。

另请参见:
activeCaptionText, 常量字段值

ACTIVE_CAPTION_BORDER

public static final int ACTIVE_CAPTION_BORDER
activeCaptionBorder 系统颜色的数组索引。

另请参见:
activeCaptionBorder, 常量字段值

INACTIVE_CAPTION

public static final int INACTIVE_CAPTION
inactiveCaption 系统颜色的数组索引。

另请参见:
inactiveCaption, 常量字段值

INACTIVE_CAPTION_TEXT

public static final int INACTIVE_CAPTION_TEXT
inactiveCaptionText 系统颜色的数组索引。

另请参见:
inactiveCaptionText, 常量字段值

INACTIVE_CAPTION_BORDER

public static final int INACTIVE_CAPTION_BORDER
inactiveCaptionBorder 系统颜色的数组索引。

另请参见:
inactiveCaptionBorder, 常量字段值