public class DefaultMetalTheme extends MetalTheme
MetalTheme提供java原貌的外观和感觉的具体实施,代号为“钢”。参考
MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme)有关更改默认主题的细节。
所有的颜色由DefaultMetalTheme完全不透明。
DefaultMetalTheme使用加粗字体为许多控件。让所有的控件(与内框的标题栏和客户装饰框架标题栏除外)使用普通的字体,你可以做以下:
swing.boldMetal到false。例如,java -Dswing.boldMetal=false MyApp。swing.boldMetal到Boolean.FALSE。例如:UIManager.put("swing.boldMetal", Boolean.FALSE);swing.boldMetal,如果设置,优先于同一名称的系统性能。在设置默认属性你需要重新安装
MetalLookAndFeel,以及更新先前创建的控件的用户界面。否则,结果是不确定的。以下说明如何做到这一点:
/关闭字体的字体”。把(“摇摆。boldmetal”,布尔。假);重新安装金属外观和感觉缺省情况(新metallookandfeel())”;/ /更新所有组件的componentuis。这所有窗口都需要调用。swingutilities updatecomponenttreeui(rootcomponent);
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans包。请看XMLEncoder。
| Constructor and Description |
|---|
DefaultMetalTheme()
创建并返回
DefaultMetalTheme实例。
|
| Modifier and Type | Method and Description |
|---|---|
FontUIResource |
getControlTextFont()
返回控件文本字体。
|
FontUIResource |
getMenuTextFont()
返回菜单文本字体。
|
String |
getName()
返回此主题的名称。
|
protected ColorUIResource |
getPrimary1()
返回主1色。
|
protected ColorUIResource |
getPrimary2()
返回主2色。
|
protected ColorUIResource |
getPrimary3()
返回主3色。
|
protected ColorUIResource |
getSecondary1()
返回第二个1色。
|
protected ColorUIResource |
getSecondary2()
返回第二个2色。
|
protected ColorUIResource |
getSecondary3()
返回第二个3色。
|
FontUIResource |
getSubTextFont()
返回子文本字体。
|
FontUIResource |
getSystemTextFont()
返回系统文本字体。
|
FontUIResource |
getUserTextFont()
返回用户文本字体。
|
FontUIResource |
getWindowTitleFont()
返回窗口标题字体。
|
addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForegroundpublic String getName()
"Steel"。
getName 方法重写,继承类
MetalTheme
protected ColorUIResource getPrimary1()
getPrimary1 方法重写,继承类
MetalTheme
protected ColorUIResource getPrimary2()
getPrimary2 方法重写,继承类
MetalTheme
protected ColorUIResource getPrimary3()
getPrimary3 方法重写,继承类
MetalTheme
protected ColorUIResource getSecondary1()
getSecondary1 方法重写,继承类
MetalTheme
protected ColorUIResource getSecondary2()
getSecondary2 方法重写,继承类
MetalTheme
protected ColorUIResource getSecondary3()
getSecondary3 方法重写,继承类
MetalTheme
public FontUIResource getControlTextFont()
getControlTextFont 方法重写,继承类
MetalTheme
public FontUIResource getSystemTextFont()
getSystemTextFont 方法重写,继承类
MetalTheme
public FontUIResource getUserTextFont()
getUserTextFont 方法重写,继承类
MetalTheme
public FontUIResource getMenuTextFont()
getMenuTextFont 方法重写,继承类
MetalTheme
public FontUIResource getWindowTitleFont()
getWindowTitleFont 方法重写,继承类
MetalTheme
public FontUIResource getSubTextFont()
getSubTextFont 方法重写,继承类
MetalTheme
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.