JavaTM 2 Platform
Standard Ed. 6

javax.swing.plaf.metal
类 OceanTheme

java.lang.Object
  继承者 javax.swing.plaf.metal.MetalTheme
      继承者 javax.swing.plaf.metal.DefaultMetalTheme
          继承者 javax.swing.plaf.metal.OceanTheme

public class OceanTheme
extends DefaultMetalTheme

MetalLookAndFeel 的默认主题。

Metal 外观的设计人员尽量保持默认外观的更新,在将来可能使用新的主题。所以,在希望定制 "Ocean" 外观时,开发人员应该直接使用此类,或强制使用它作为当前主题,不用顾及将来的更新。

OceanTheme 返回的所有颜色都是完全不透明的。

从以下版本开始:
1.5
另请参见:
MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme)

构造方法摘要
OceanTheme()
          创建一个 OceanTheme 实例
 
方法摘要
 void addCustomEntriesToTable(UIDefaults table)
          将此主题的自定义条目添加到默认表中。
protected  ColorUIResource getBlack()
          返回黑色。
 ColorUIResource getControlTextColor()
          返回控件文本颜色。
 ColorUIResource getDesktopColor()
          返回桌面颜色。
 ColorUIResource getInactiveControlTextColor()
          返回非活动控件文本颜色。
 ColorUIResource getMenuDisabledForeground()
          返回菜单禁用前景色。
 String getName()
          返回此主题的名称,即 "Ocean"。
protected  ColorUIResource getPrimary1()
          返回 primary 1 颜色。
protected  ColorUIResource getPrimary2()
          返回 primary 2 颜色。
protected  ColorUIResource getPrimary3()
          返回 primary 3 颜色。
protected  ColorUIResource getSecondary1()
          返回 secondary 1 颜色。
protected  ColorUIResource getSecondary2()
          返回 secondary 2 颜色。
protected  ColorUIResource getSecondary3()
          返回 secondary 3 颜色。
 
从类 javax.swing.plaf.metal.DefaultMetalTheme 继承的方法
getControlTextFont, getMenuTextFont, getSubTextFont, getSystemTextFont, getUserTextFont, getWindowTitleFont
 
从类 javax.swing.plaf.metal.MetalTheme 继承的方法
getAcceleratorForeground, getAcceleratorSelectedForeground, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getFocusColor, getHighlightedTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

OceanTheme

public OceanTheme()
创建一个 OceanTheme 实例

方法详细信息

addCustomEntriesToTable

public void addCustomEntriesToTable(UIDefaults table)
将此主题的自定义条目添加到默认表中。

覆盖:
MetalTheme 中的 addCustomEntriesToTable
参数:
table - 非 null 的默认表
抛出:
NullPointerException - 如果 tablenull
另请参见:
MetalLookAndFeel.getDefaults()

getName

public String getName()
返回此主题的名称,即 "Ocean"。

覆盖:
DefaultMetalTheme 中的 getName
返回:
"Ocean"

getPrimary1

protected ColorUIResource getPrimary1()
返回 primary 1 颜色。此方法返回 rgb 十六进制值为 0x6382BF 的颜色。

覆盖:
DefaultMetalTheme 中的 getPrimary1
返回:
primary 1 颜色
另请参见:
Color.decode(java.lang.String)

getPrimary2

protected ColorUIResource getPrimary2()
返回 primary 2 颜色。此方法返回 rgb 十六进制值为 0xA3B8CC 的颜色。

覆盖:
DefaultMetalTheme 中的 getPrimary2
返回:
primary 2 颜色
另请参见:
Color.decode(java.lang.String)

getPrimary3

protected ColorUIResource getPrimary3()
返回 primary 3 颜色。此方法返回 rgb 十六进制值为 0xB8CFE5 的颜色。

覆盖:
DefaultMetalTheme 中的 getPrimary3
返回:
primary 3 颜色
另请参见:
Color.decode(java.lang.String)

getSecondary1

protected ColorUIResource getSecondary1()
返回 secondary 1 颜色。此方法返回 rgb 十六进制值为 0x7A8A99 的颜色。

覆盖:
DefaultMetalTheme 中的 getSecondary1
返回:
secondary 1 颜色
另请参见:
Color.decode(java.lang.String)

getSecondary2

protected ColorUIResource getSecondary2()
返回 secondary 2 颜色。此方法返回 rgb 十六进制值为 0xB8CFE5 的颜色。

覆盖:
DefaultMetalTheme 中的 getSecondary2
返回:
secondary 2 颜色
另请参见:
Color.decode(java.lang.String)

getSecondary3

protected ColorUIResource getSecondary3()
返回 secondary 3 颜色。此方法返回 rgb 十六进制值为 0xEEEEEE 的颜色。

覆盖:
DefaultMetalTheme 中的 getSecondary3
返回:
secondary 3 颜色
另请参见:
Color.decode(java.lang.String)

getBlack

protected ColorUIResource getBlack()
返回黑色。此方法返回 rgb 十六进制值为 0x333333 的颜色。

覆盖:
MetalTheme 中的 getBlack
返回:
黑色
另请参见:
Color.decode(java.lang.String)

getDesktopColor

public ColorUIResource getDesktopColor()
返回桌面颜色。此方法返回 rgb 十六进制值为 0xFFFFFF 的颜色。

覆盖:
MetalTheme 中的 getDesktopColor
返回:
桌面颜色
另请参见:
Color.decode(java.lang.String)

getInactiveControlTextColor

public ColorUIResource getInactiveControlTextColor()
返回非活动控件文本颜色。此方法返回 rgb 十六进制值为 0x999999 的颜色。

覆盖:
MetalTheme 中的 getInactiveControlTextColor
返回:
非活动控件文本颜色

getControlTextColor

public ColorUIResource getControlTextColor()
返回控件文本颜色。此方法返回 rgb 十六进制值为 0x333333 的颜色。

覆盖:
MetalTheme 中的 getControlTextColor
返回:
控件文本颜色

getMenuDisabledForeground

public ColorUIResource getMenuDisabledForeground()
返回菜单禁用前景色。此方法返回 rgb 十六进制值为 0x999999 的颜色。

覆盖:
MetalTheme 中的 getMenuDisabledForeground
返回:
菜单禁用前景色

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java 2 SDK SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策