public class MultiLookAndFeel extends LookAndFeel
一个复用的外观和感觉,允许多个用户界面同时与一个组件相关。初级的外观和感觉被称为默认的外观和感觉,和其他的外观和感觉被称为辅助。
更多信息,见Using the Multiplexing Look and Feel.
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans包。请看XMLEncoder。
| Constructor and Description |
|---|
MultiLookAndFeel() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUIs(ComponentUI mui, Vector uis, JComponent target)
创建所需的呈现
target组件的
ComponentUI对象,将对象放置在
uis向量并返回最能代表组件的UI
ComponentUI对象。
|
UIDefaults |
getDefaults()
创建、初始化并返回的外观和感觉,具体的缺陷。
|
String |
getDescription()
返回此外观和感觉的一一行说明。
|
String |
getID()
返回一个字符串,适用于应用程序/服务,确定了这个外观和感觉。
|
String |
getName()
返回一个字符串,适合在菜单中使用,确定了这个外观和感觉。
|
boolean |
isNativeLookAndFeel()
返回
false;这感觉是不是原产于任何平台。
|
boolean |
isSupportedLookAndFeel()
返回
true;每个平台允许这样的外观和感觉。
|
protected static ComponentUI[] |
uisToArray(Vector uis)
创建一个数组,它填充了从通过矢量UI对象,并返回数组。
|
getDesktopPropertyValue, getDisabledIcon, getDisabledSelectedIcon, getLayoutStyle, getSupportsWindowDecorations, initialize, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninitialize, uninstallBorderpublic String getName()
getName 方法重写,继承类
LookAndFeel
public String getID()
getID 方法重写,继承类
LookAndFeel
public String getDescription()
getDescription 方法重写,继承类
LookAndFeel
public boolean isNativeLookAndFeel()
false;这感觉是不是原产于任何平台。
isNativeLookAndFeel 方法重写,继承类
LookAndFeel
false
public boolean isSupportedLookAndFeel()
true;每个平台允许这样的外观和感觉。
isSupportedLookAndFeel 方法重写,继承类
LookAndFeel
true
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public UIDefaults getDefaults()
ComponentUI类的名称(如“javax.摆动。PLAF。多MultiButtonUI。”)。
getDefaults 方法重写,继承类
LookAndFeel
UIDefaults对象初始化
JComponent.getUIClassID()
public static ComponentUI createUIs(ComponentUI mui, Vector uis, JComponent target)
target组件的
ComponentUI对象,将对象放置在
uis向量并返回最能代表组件的UI
ComponentUI对象。这种方法发现
ComponentUI对象通过调用
getDefaults().getUI(target)每个默认和辅助的外观和感觉,目前在用的。第一个UI对象这种方法增加了
uis向量是默认的外观和感觉。
这种方法是通过createUI MultiXxxxUI类调用的方法。
mui -表示该
target组成完整的UI
ComponentUI对象;这应该是一个类的实例的
MultiXxxxUI
uis -
Vector;通常这是
mui
uis领域争论的
target -组件的用户界面是由
mui
mui如果组件有任何辅助UI对象;否则,返回默认UI对象的外观和感觉,或
null如果默认UI对象不能被发现
UIManager.getAuxiliaryLookAndFeels(),
UIDefaults.getUI(javax.swing.JComponent),
MultiButtonUI.uis,
MultiButtonUI.createUI(javax.swing.JComponent)
protected static ComponentUI[] uisToArray(Vector uis)
uis是无效的,该方法返回一个零元素的数组。如果
uis空向量,此方法返回
null。如果在
uis向量的任何对象都没有
ComponentUI型发生运行时错误。
uis -载体
ComponentUI对象
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.