JavaTM 2 Platform
Standard Ed. 6

javax.swing.plaf.metal
类 MetalLookAndFeel

java.lang.Object
  继承者 javax.swing.LookAndFeel
      继承者 javax.swing.plaf.basic.BasicLookAndFeel
          继承者 javax.swing.plaf.metal.MetalLookAndFeel
所有已实现的接口:
Serializable

public class MetalLookAndFeel
extends BasicLookAndFeel

Java 外观,也称为 Metal。

每个由 MetalLookAndFeel 提供的 ComponentUI 从默认表中派生其行为。除非另行说明,否则此包中每个 ComponentUI 实现都记录它们所使用的默认值集合。除非另行说明,否则调用 installUI 时,将安装默认值并遵循 LookAndFeel 中描述的安装默认值的建议。

MetalLookAndFeelMetalTheme 派生其调色板和字体。默认主题为 OceanTheme。可以使用 setCurrentTheme 方法更改主题,有关更改主题的详细信息,请参阅该方法。在 1.5 之前,默认主题为 DefaultMetalTheme。可以将系统属性 "swing.metalTheme" 设置为 "steel",指示默认主题应该为 DefaultMetalTheme

警告:此类的序列化对象与以后的 Swing 版本不兼容。当前序列化支持适用于短期存储,或适用于在运行相同 Swing 版本的应用程序之间进行 RMI(Remote Method Invocation,远程方法调用)。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder

另请参见:
MetalTheme, DefaultMetalTheme, OceanTheme

构造方法摘要
MetalLookAndFeel()
           
 
方法摘要
protected  void createDefaultTheme()
          确保当前 MetalTheme非 null
static ColorUIResource getAcceleratorForeground()
          返回当前主题的加速器前景颜色。
static ColorUIResource getAcceleratorSelectedForeground()
          返回当前主题的加速器选中前景颜色。
static ColorUIResource getBlack()
          返回当前主题的黑色。
static ColorUIResource getControl()
          返回当前主题的控件颜色。
static ColorUIResource getControlDarkShadow()
          返回当前主题的控件加黑阴影颜色。
static ColorUIResource getControlDisabled()
          返回当前主题的控件禁用颜色。
static ColorUIResource getControlHighlight()
          返回当前主题的控件高亮显示颜色。
static ColorUIResource getControlInfo()
          返回当前主题的控件信息颜色。
static ColorUIResource getControlShadow()
          返回当前主题的控件阴影颜色。
static ColorUIResource getControlTextColor()
          返回当前主题的控件文本颜色。
static FontUIResource getControlTextFont()
          返回当前主题的控件文本字体。
static MetalTheme getCurrentTheme()
          返回 MetalLookAndFeel 当前正在使用的主题。
 UIDefaults getDefaults()
          返回外观的默认值。
 String getDescription()
          返回此外观的简短描述。
static ColorUIResource getDesktopColor()
          返回当前主题的桌面颜色。
 Icon getDisabledIcon(JComponent component, Icon icon)
          返回具有禁用外观的 Icon
 Icon getDisabledSelectedIcon(JComponent component, Icon icon)
          返回由选定的禁用组件使用的 Icon
static ColorUIResource getFocusColor()
          返回当前主题的焦点颜色。
static ColorUIResource getHighlightedTextColor()
          返回当前主题的加亮文本颜色。
 String getID()
          此外观的标识符。
static ColorUIResource getInactiveControlTextColor()
          返回当前主题的非活动控件文本颜色。
static ColorUIResource getInactiveSystemTextColor()
          返回当前主题的非活动系统文本颜色。
 LayoutStyle getLayoutStyle()
          返回一个 LayoutStyle,它实现 http://java.sun.com/products/jlf/ed2/book/HIG.Visual2.html 中指定的 Java 外观设计原则。
static ColorUIResource getMenuBackground()
          返回当前主题的菜单背景颜色。
static ColorUIResource getMenuDisabledForeground()
          返回当前主题的菜单禁用前景颜色。
static ColorUIResource getMenuForeground()
          返回当前主题的菜单前景颜色。
static ColorUIResource getMenuSelectedBackground()
          返回当前主题的菜单选中背景颜色。
static ColorUIResource getMenuSelectedForeground()
          返回当前主题的菜单选中前景颜色。
static FontUIResource getMenuTextFont()
          返回当前主题的菜单文本字体。
 String getName()
          返回此外观的名称。
static ColorUIResource getPrimaryControl()
          返回当前主题的 primary 控件颜色。
static ColorUIResource getPrimaryControlDarkShadow()
          返回当前主题的 primary 控件加黑阴影颜色。
static ColorUIResource getPrimaryControlHighlight()
          返回当前主题的 primary 控件高亮显示颜色。
static ColorUIResource getPrimaryControlInfo()
          返回当前主题的 primary 控件信息颜色。
static ColorUIResource getPrimaryControlShadow()
          返回当前主题的 primary 控件阴影颜色。
static ColorUIResource getSeparatorBackground()
          返回当前主题的分隔符背景颜色。
static ColorUIResource getSeparatorForeground()
          返回当前主题的分隔符前景颜色。
static FontUIResource getSubTextFont()
          返回当前主题的子文本字体。
 boolean getSupportsWindowDecorations()
          返回 true; metal 可以提供 Window 装饰。
static ColorUIResource getSystemTextColor()
          返回当前主题的系统文本颜色。
static FontUIResource getSystemTextFont()
          返回当前主题的系统文本字体。
static ColorUIResource getTextHighlightColor()
          返回当前主题的文本高亮显示颜色。
static ColorUIResource getUserTextColor()
          返回当前主题的用户文本颜色。
static FontUIResource getUserTextFont()
          返回当前主题的用户文本字体。
static ColorUIResource getWhite()
          返回当前主题的白色。
static ColorUIResource getWindowBackground()
          返回当前主题的窗口背景颜色。
static ColorUIResource getWindowTitleBackground()
          返回当前主题的窗口标题背景颜色。
static FontUIResource getWindowTitleFont()
          返回当前主题的窗口标题字体。
static ColorUIResource getWindowTitleForeground()
          返回当前主题的窗口标题前景色。
static ColorUIResource getWindowTitleInactiveBackground()
          返回当前主题的窗口标题非活动背景颜色。
static ColorUIResource getWindowTitleInactiveForeground()
          返回当前主题的窗口标题非活动前景颜色。
protected  void initClassDefaults(UIDefaults table)
          用从 uiClassID 到 ui 类完全限定名的映射关系填充 table
protected  void initComponentDefaults(UIDefaults table)
          用 metal 的默认值填充 table
protected  void initSystemColorDefaults(UIDefaults table)
          用系统颜色填充 table
 boolean isNativeLookAndFeel()
          返回 falseMetalLookAndFeel 不是本机外观。
 boolean isSupportedLookAndFeel()
          返回 true;可以在任意平台上运行 MetalLookAndFeel
 void provideErrorFeedback(Component component)
          在用户尝试一个无效操作时调用,例如,在具有焦点的不可编辑的 JTextField 中进行粘贴。
static void setCurrentTheme(MetalTheme theme)
          设置 MetalLookAndFeel 使用的主题。
 
从类 javax.swing.plaf.basic.BasicLookAndFeel 继承的方法
createAudioAction, getAudioActionMap, initialize, loadSystemColors, playSound, uninitialize
 
从类 javax.swing.LookAndFeel 继承的方法
getDesktopPropertyValue, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninstallBorder
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

MetalLookAndFeel

public MetalLookAndFeel()
方法详细信息

getName

public String getName()
返回此外观的名称。此方法返回 "Metal"

指定者:
LookAndFeel 中的 getName
返回:
此外观的名称

getID

public String getID()
此外观的标识符。此方法返回 "Metal"

指定者:
LookAndFeel 中的 getID
返回:
此外观的标识符

getDescription

public String getDescription()
返回此外观的简短描述。此方法返回 "The Java(tm) Look and Feel"

指定者:
LookAndFeel 中的 getDescription
返回:
外观的简短描述

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
返回 falseMetalLookAndFeel 不是本机外观。

指定者:
LookAndFeel 中的 isNativeLookAndFeel
返回:
false

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
返回 true;可以在任意平台上运行 MetalLookAndFeel

指定者:
LookAndFeel 中的 isSupportedLookAndFeel
返回:
true
另请参见:
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

getSupportsWindowDecorations

public boolean getSupportsWindowDecorations()
返回 true; metal 可以提供 Window 装饰。

覆盖:
LookAndFeel 中的 getSupportsWindowDecorations
返回:
true
从以下版本开始:
1.4
另请参见:
JDialog.setDefaultLookAndFeelDecorated(boolean), JFrame.setDefaultLookAndFeelDecorated(boolean), JRootPane.setWindowDecorationStyle(int)

initClassDefaults

protected void initClassDefaults(UIDefaults table)
用从 uiClassID 到 ui 类完全限定名的映射关系填充 tableMetalLookAndFeel 在名为 MetalXXXUI 的 javax.swing.plaf.metal 包为每个类注册一个条目。字符串 XXX 为 Swing 的一个 uiClassID。对于在 metal 中没有类的 uiClassID,使用 javax.swing.plaf.basic 中对应的类。例如,metal 没有名为 "MetalColorChooserUI" 的类,这种情况下使用 javax.swing.plaf.basic.BasicColorChooserUI

覆盖:
BasicLookAndFeel 中的 initClassDefaults
参数:
table - 要添加条目的 UIDefaults 实例
抛出:
NullPointerException - 如果 tablenull
另请参见:
BasicLookAndFeel.initClassDefaults(javax.swing.UIDefaults)

initSystemColorDefaults

protected void initSystemColorDefaults(UIDefaults table)
用系统颜色填充 table。将以下值添加到 table
Key Value
"desktop" theme.getDesktopColor()
"activeCaption" theme.getWindowTitleBackground()
"activeCaptionText" theme.getWindowTitleForeground()
"activeCaptionBorder" theme.getPrimaryControlShadow()
"inactiveCaption" theme.getWindowTitleInactiveBackground()
"inactiveCaptionText" theme.getWindowTitleInactiveForeground()
"inactiveCaptionBorder" theme.getControlShadow()
"window" theme.getWindowBackground()
"windowBorder" theme.getControl()
"windowText" theme.getUserTextColor()
"menu" theme.getMenuBackground()
"menuText" theme.getMenuForeground()
"text" theme.getWindowBackground()
"textText" theme.getUserTextColor()
"textHighlight" theme.getTextHighlightColor()
"textHighlightText" theme.getHighlightedTextColor()
"textInactiveText" theme.getInactiveSystemTextColor()
"control" theme.getControl()
"controlText" theme.getControlTextColor()
"controlHighlight" theme.getControlHighlight()
"controlLtHighlight" theme.getControlHighlight()
"controlShadow" theme.getControlShadow()
"controlDkShadow" theme.getControlDarkShadow()
"scrollbar" theme.getControl()
"info" theme.getPrimaryControl()
"infoText" theme.getPrimaryControlInfo()
theme 对应于当前 MetalTheme

覆盖:
BasicLookAndFeel 中的 initSystemColorDefaults
参数:
table - 要添加值的 UIDefaults 对象
抛出:
NullPointerException - 如果 tablenull
另请参见:
SystemColor, BasicLookAndFeel.getDefaults(), BasicLookAndFeel.loadSystemColors(javax.swing.UIDefaults, java.lang.String[], boolean)

initComponentDefaults

protected void initComponentDefaults(UIDefaults table)
用 metal 的默认值填充 table

覆盖:
BasicLookAndFeel 中的 initComponentDefaults
参数:
table - 要添加值的 UIDefaults
抛出:
NullPointerException - 如果 tablenull

createDefaultTheme

protected void createDefaultTheme()
确保当前 MetalTheme非 null。此方法是 getCurrentTheme 的覆盖方法。

另请参见:
getCurrentTheme()

getDefaults

public UIDefaults getDefaults()
返回外观的默认值。此方法按顺序调用 createDefaultTheme()super.getDefaults()getCurrentTheme().addCustomEntriesToTable(table)

虽然此方法是公共方法,但只当外观被设置为当前外观并调用了 initialize 之后才应该由 UIManager 调用此方法。

覆盖:
BasicLookAndFeel 中的 getDefaults
返回:
外观默认值
另请参见:
createDefaultTheme(), BasicLookAndFeel.getDefaults(), MetalTheme.addCustomEntriesToTable(UIDefaults)

provideErrorFeedback

public void provideErrorFeedback(Component component)
在用户尝试一个无效操作时调用,例如,在具有焦点的不可编辑的 JTextField 中进行粘贴。默认实现蜂鸣。期待不同行为的子类应重写它,并提供其他的反馈。

覆盖:
LookAndFeel 中的 provideErrorFeedback
参数:
component - 其中发生错误的 Component,可以为 null,指示错误条件与某个 Component 并无直接关联
从以下版本开始:
1.4

setCurrentTheme

public static void setCurrentTheme(MetalTheme theme)
设置 MetalLookAndFeel 使用的主题。

设置主题后,需要重新安装 MetalLookAndFeel 并重新创建 ui。以下代码说明了如何完成此操作:

   MetalLookAndFeel.setCurrentTheme(theme);

   // re-install the Metal Look and Feel
   UIManager.setLookAndFeel(new MetalLookAndFeel());

   // Update the ComponentUIs for all Components. This
   // needs to be invoked for all windows.
   SwingUtilities.updateComponentTreeUI(rootComponent);
 
如果此操作未完成,则结果是不确定的。

参数:
theme - 要使用的主题
抛出:
NullPointerException - 如果 themenull
另请参见:
getCurrentTheme()

getCurrentTheme

public static MetalTheme getCurrentTheme()
返回 MetalLookAndFeel 当前正在使用的主题。如果当前主题为 null,则创建默认主题。

返回:
当前主题
从以下版本开始:
1.5
另请参见:
setCurrentTheme(javax.swing.plaf.metal.MetalTheme)

getDisabledIcon

public Icon getDisabledIcon(JComponent component,
                            Icon icon)
返回具有禁用外观的 Icon。此方法用于在未指定图标时生成被禁用的 Icon。例如,如果创建了一个 JButton,并通过 setIcon 仅指定了一个 Icon,则会调用此方法来生成禁用的 Icon。如果将 null 作为 icon 传递,则此方法返回 null。

某些外观可能无法呈现禁用图标,在此情况下,外观将忽略此图标。

覆盖:
LookAndFeel 中的 getDisabledIcon
参数:
component - 将显示 Icon 的 JComponent,可以为 null
icon - 从其生成禁用图标的 Icon。
返回:
禁用图标;如果无法生成合适的 Icon,则返回 null。
从以下版本开始:
1.5

getDisabledSelectedIcon

public Icon getDisabledSelectedIcon(JComponent component,
                                    Icon icon)
返回由选定的禁用组件使用的 Icon。此方法用于为以下情况的组件生成一个 Icon:这些组件均为禁用和选中状态,但没有此状态的指定 Icon。例如,如果创建了一个 JButton,并通过 setIcon 仅指定了一个 Icon,则会调用此方法来生成被禁用和选中的 Icon。如果将 null 作为 icon 传递,则此方法返回 null。

有些外观可能不呈现禁用和选中的 Icon,在此情况下这些外观将忽略它。

覆盖:
LookAndFeel 中的 getDisabledSelectedIcon
参数:
component - 将显示 Icon 的 JComponent,可以为 null
icon - 从其生成禁用和选中图标的 Icon。
返回:
禁用和选中的图标,如果可以生成合适的 Icon,则返回 null。
从以下版本开始:
1.5

getControlTextFont

public static FontUIResource getControlTextFont()
返回当前主题的控件文本字体。此方法是 getCurrentTheme().getControlTextColor() 的覆盖方法。

返回:
控件文本字体
另请参见:
MetalTheme

getSystemTextFont

public static FontUIResource getSystemTextFont()
返回当前主题的系统文本字体。此方法是 getCurrentTheme().getSystemTextFont() 的覆盖方法。

返回:
系统文本字体
另请参见:
MetalTheme

getUserTextFont

public static FontUIResource getUserTextFont()
返回当前主题的用户文本字体。此方法是 getCurrentTheme().getUserTextFont() 的覆盖方法。

返回:
用户文本字体
另请参见:
MetalTheme

getMenuTextFont

public static FontUIResource getMenuTextFont()
返回当前主题的菜单文本字体。此方法是 getCurrentTheme().getMenuTextFont() 的覆盖方法。

返回:
菜单文本字体
另请参见:
MetalTheme

getWindowTitleFont

public static FontUIResource getWindowTitleFont()
返回当前主题的窗口标题字体。此方法是 getCurrentTheme().getWindowTitleFont() 的覆盖方法。

返回:
窗口标题字体
另请参见:
MetalTheme

getSubTextFont

public static FontUIResource getSubTextFont()
返回当前主题的子文本字体。此方法是 getCurrentTheme().getSubTextFont() 的覆盖方法。

返回:
子文本字体
另请参见:
MetalTheme

getDesktopColor

public static ColorUIResource getDesktopColor()
返回当前主题的桌面颜色。此方法是 getCurrentTheme().getDesktopColor() 的覆盖方法。

返回:
桌面颜色
另请参见:
MetalTheme

getFocusColor

public static ColorUIResource getFocusColor()
返回当前主题的焦点颜色。此方法是 getCurrentTheme().getFocusColor() 的覆盖方法。

返回:
焦点颜色
另请参见:
MetalTheme

getWhite

public static ColorUIResource getWhite()
返回当前主题的白色。此方法是 getCurrentTheme().getWhite() 的覆盖方法。

返回:
白色
另请参见:
MetalTheme

getBlack

public static ColorUIResource getBlack()
返回当前主题的黑色。此方法是 getCurrentTheme().getBlack() 的覆盖方法。

返回:
黑色
另请参见:
MetalTheme

getControl

public static ColorUIResource getControl()
返回当前主题的控件颜色。此方法是 getCurrentTheme().getControl() 的覆盖方法。

返回:
控件颜色
另请参见:
MetalTheme

getControlShadow

public static ColorUIResource getControlShadow()
返回当前主题的控件阴影颜色。此方法是 getCurrentTheme().getControlShadow() 的覆盖方法。

返回:
控件阴影颜色
另请参见:
MetalTheme

getControlDarkShadow

public static ColorUIResource getControlDarkShadow()
返回当前主题的控件加黑阴影颜色。此方法是 getCurrentTheme().getControlDarkShadow() 的覆盖方法。

返回:
控件加黑阴影颜色
另请参见:
MetalTheme

getControlInfo

public static ColorUIResource getControlInfo()
返回当前主题的控件信息颜色。此方法是 getCurrentTheme().getControlInfo() 的覆盖方法。

返回:
控件信息颜色
另请参见:
MetalTheme

getControlHighlight

public static ColorUIResource getControlHighlight()
返回当前主题的控件高亮显示颜色。此方法是 getCurrentTheme().getControlHighlight() 的覆盖方法。

返回:
控件高亮显示颜色
另请参见:
MetalTheme

getControlDisabled

public static ColorUIResource getControlDisabled()
返回当前主题的控件禁用颜色。此方法是 getCurrentTheme().getControlDisabled() 的覆盖方法。

返回:
控件禁用颜色
另请参见:
MetalTheme

getPrimaryControl

public static ColorUIResource getPrimaryControl()
返回当前主题的 primary 控件颜色。此方法是 getCurrentTheme().getPrimaryControl() 的覆盖方法。

返回:
primary 控件颜色
另请参见:
MetalTheme

getPrimaryControlShadow

public static ColorUIResource getPrimaryControlShadow()
返回当前主题的 primary 控件阴影颜色。此方法是 getCurrentTheme().getPrimaryControlShadow() 的覆盖方法。

返回:
primary 控件阴影颜色
另请参见:
MetalTheme

getPrimaryControlDarkShadow

public static ColorUIResource getPrimaryControlDarkShadow()
返回当前主题的 primary 控件加黑阴影颜色。此方法是 getCurrentTheme().getPrimaryControlDarkShadow() 的覆盖方法。

返回:
primary 控件加黑阴影颜色
另请参见:
MetalTheme

getPrimaryControlInfo

public static ColorUIResource getPrimaryControlInfo()
返回当前主题的 primary 控件信息颜色。此方法是 getCurrentTheme().getPrimaryControlInfo() 的覆盖方法。

返回:
primary 控件信息颜色
另请参见:
MetalTheme

getPrimaryControlHighlight

public static ColorUIResource getPrimaryControlHighlight()
返回当前主题的 primary 控件高亮显示颜色。此方法是 getCurrentTheme().getPrimaryControlHighlight() 的覆盖方法。

返回:
primary 控件高亮显示颜色
另请参见:
MetalTheme

getSystemTextColor

public static ColorUIResource getSystemTextColor()
返回当前主题的系统文本颜色。此方法是 getCurrentTheme().getSystemTextColor() 的覆盖方法。

返回:
系统文本颜色
另请参见:
MetalTheme

getControlTextColor

public static ColorUIResource getControlTextColor()
返回当前主题的控件文本颜色。此方法是 getCurrentTheme().getControlTextColor() 的覆盖方法。

返回:
控件文本颜色
另请参见:
MetalTheme

getInactiveControlTextColor

public static ColorUIResource getInactiveControlTextColor()
返回当前主题的非活动控件文本颜色。此方法是 getCurrentTheme().getInactiveControlTextColor() 的覆盖方法。

返回:
非活动控件文本颜色
另请参见:
MetalTheme

getInactiveSystemTextColor

public static ColorUIResource getInactiveSystemTextColor()
返回当前主题的非活动系统文本颜色。此方法是 getCurrentTheme().getInactiveSystemTextColor() 的覆盖方法。

返回:
非活动系统文本颜色
另请参见:
MetalTheme

getUserTextColor

public static ColorUIResource getUserTextColor()
返回当前主题的用户文本颜色。此方法是 getCurrentTheme().getUserTextColor() 的覆盖方法。

返回:
用户文本颜色
另请参见:
MetalTheme

getTextHighlightColor

public static ColorUIResource getTextHighlightColor()
返回当前主题的文本高亮显示颜色。此方法是 getCurrentTheme().getTextHighlightColor() 的覆盖方法。

返回:
文本高亮显示颜色
另请参见:
MetalTheme

getHighlightedTextColor

public static ColorUIResource getHighlightedTextColor()
返回当前主题的加亮文本颜色。此方法是 getCurrentTheme().getHighlightedTextColor() 的覆盖方法。

返回:
加亮文本颜色
另请参见:
MetalTheme

getWindowBackground

public static ColorUIResource getWindowBackground()
返回当前主题的窗口背景颜色。此方法是 getCurrentTheme().getWindowBackground() 的覆盖方法。

返回:
窗口背景颜色
另请参见:
MetalTheme

getWindowTitleBackground

public static ColorUIResource getWindowTitleBackground()
返回当前主题的窗口标题背景颜色。此方法是 getCurrentTheme().getWindowTitleBackground() 的覆盖方法。

返回:
窗口标题背景颜色
另请参见:
MetalTheme

getWindowTitleForeground

public static ColorUIResource getWindowTitleForeground()
返回当前主题的窗口标题前景色。此方法是 getCurrentTheme().getWindowTitleForeground() 的覆盖方法。

返回:
窗口标题前景色
另请参见:
MetalTheme

getWindowTitleInactiveBackground

public static ColorUIResource getWindowTitleInactiveBackground()
返回当前主题的窗口标题非活动背景颜色。此方法是 getCurrentTheme().getWindowTitleInactiveBackground() 的覆盖方法。

返回:
窗口标题非活动背景颜色
另请参见:
MetalTheme

getWindowTitleInactiveForeground

public static ColorUIResource getWindowTitleInactiveForeground()
返回当前主题的窗口标题非活动前景颜色。此方法是 getCurrentTheme().getWindowTitleInactiveForeground() 的覆盖方法。

返回:
窗口标题非活动前景颜色
另请参见:
MetalTheme

getMenuBackground

public static ColorUIResource getMenuBackground()
返回当前主题的菜单背景颜色。此方法是 getCurrentTheme().getMenuBackground() 的覆盖方法。

返回:
菜单背景颜色
另请参见:
MetalTheme

getMenuForeground

public static ColorUIResource getMenuForeground()
返回当前主题的菜单前景颜色。此方法是 getCurrentTheme().getMenuForeground() 的覆盖方法。

返回:
菜单前景颜色
另请参见:
MetalTheme

getMenuSelectedBackground

public static ColorUIResource getMenuSelectedBackground()
返回当前主题的菜单选中背景颜色。此方法是 getCurrentTheme().getMenuSelectedBackground() 的覆盖方法。

返回:
菜单选中背景颜色
另请参见:
MetalTheme

getMenuSelectedForeground

public static ColorUIResource getMenuSelectedForeground()
返回当前主题的菜单选中前景颜色。此方法是 getCurrentTheme().getMenuSelectedForeground() 的覆盖方法。

返回:
菜单选中前景颜色
另请参见:
MetalTheme

getMenuDisabledForeground

public static ColorUIResource getMenuDisabledForeground()
返回当前主题的菜单禁用前景颜色。此方法是 getCurrentTheme().getMenuDisabledForeground() 的覆盖方法。

返回:
菜单禁用前景颜色
另请参见:
MetalTheme

getSeparatorBackground

public static ColorUIResource getSeparatorBackground()
返回当前主题的分隔符背景颜色。此方法是 getCurrentTheme().getSeparatorBackground() 的覆盖方法。

返回:
分隔符背景颜色
另请参见:
MetalTheme

getSeparatorForeground

public static ColorUIResource getSeparatorForeground()
返回当前主题的分隔符前景颜色。此方法是 getCurrentTheme().getSeparatorForeground() 的覆盖方法。

返回:
分隔符前景颜色
另请参见:
MetalTheme

getAcceleratorForeground

public static ColorUIResource getAcceleratorForeground()
返回当前主题的加速器前景颜色。此方法是 getCurrentTheme().getAcceleratorForeground() 的覆盖方法。

返回:
分隔符加速器前景颜色
另请参见:
MetalTheme

getAcceleratorSelectedForeground

public static ColorUIResource getAcceleratorSelectedForeground()
返回当前主题的加速器选中前景颜色。此方法是 getCurrentTheme().getAcceleratorSelectedForeground() 的覆盖方法。

返回:
加速器选中前景颜色
另请参见:
MetalTheme

getLayoutStyle

public LayoutStyle getLayoutStyle()
返回一个 LayoutStyle,它实现 http://java.sun.com/products/jlf/ed2/book/HIG.Visual2.html 中指定的 Java 外观设计原则。

覆盖:
LookAndFeel 中的 getLayoutStyle
返回:
实现 Java 外观设计原则的 LayoutStyle
从以下版本开始:
1.6
另请参见:
LayoutStyle.getInstance()

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only