|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.LookAndFeel
javax.swing.plaf.basic.BasicLookAndFeel
public abstract class BasicLookAndFeel
实现标准 LookAndFeel 基类,标准桌面 LookAndFeel 类(JLF、Mac、Windows 等)从该基类派生。此类不能直接实例化,但是 "Basic" 定义的 UI 类可以。
警告:此类的序列化对象将与以后的 Swing 版本不兼容。当前的序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder。
| 构造方法摘要 | |
|---|---|
BasicLookAndFeel()
|
|
| 方法摘要 | |
|---|---|
protected Action |
createAudioAction(Object key)
返回 Action。 |
protected ActionMap |
getAudioActionMap()
返回 ActionMap。 |
UIDefaults |
getDefaults()
此方法由 UIManager.setLookAndFeel 调用一次以创建特定于外观的默认表。 |
protected void |
initClassDefaults(UIDefaults table)
初始化从 uiClassID 到 BasicComponentUI 的映射。 |
protected void |
initComponentDefaults(UIDefaults table)
|
void |
initialize()
UIManager.setLookAndFeel 在首次调用(通常是惟一的调用)getDefaults() 之前调用此方法。 |
protected void |
initSystemColorDefaults(UIDefaults table)
将 SystemColor 加载到默认表中。 |
protected void |
loadSystemColors(UIDefaults table,
String[] systemColors,
boolean useNative)
如果此为本地外观,则系统颜色属性的初始值与 SystemColor 常量相同。 |
protected void |
playSound(Action audioAction)
决定是否激发传递给它的 Action,如果必要,激发 Action 的 actionPerformed 方法。 |
void |
uninitialize()
UIManager.setLookAndFeel 仅在使用新的默认外观替换之前调用此方法。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public BasicLookAndFeel()
| 方法详细信息 |
|---|
public UIDefaults getDefaults()
LookAndFeel 复制的描述
LookAndFeel 中的 getDefaultsLookAndFeel.initialize(),
LookAndFeel.uninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)public void initialize()
LookAndFeel 中的 initializeLookAndFeel.uninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)public void uninitialize()
LookAndFeel 中的 uninitializeLookAndFeel.initialize()protected void initClassDefaults(UIDefaults table)
getDefaults()protected void initSystemColorDefaults(UIDefaults table)
protected void loadSystemColors(UIDefaults table,
String[] systemColors,
boolean useNative)
systemColor 参数中的整数颜色值。
protected void initComponentDefaults(UIDefaults table)
protected ActionMap getAudioActionMap()
ActionMap。
此 ActionMap 包含具有呈现听觉提示能力的 Action。这些听觉提示映射到用户和可能帮助最终用户了解的系统活动(如对话框的出现)。
在 JComponent UI 的生命周期的适当时间,ComponentUI 负责从 ActionMap 获取适当的 Action 并将其传递给 playSound。
此 ActionMap 中的 Action 是由 createAudioAction 方法创建的。
createAudioAction(java.lang.Object),
playSound(Action)protected Action createAudioAction(Object key)
Action。
此 Action 包含呈现听觉提示的信息和逻辑。传递给此方法的 Object 包含呈现听觉提示所需的信息。通常,此 Object 是一个指向相对于当前包的音频文件的 String。此 Action 的 actionPerformed 方法由 playSound 方法激发。
playSound(Action)protected void playSound(Action audioAction)
Action,如果必要,激发 Action 的 actionPerformed 方法。此方法具有呈现适合该情况的音频的作用。
要播放的可能的提示集合存储在默认表值 "AuditoryCues.cueList" 中。要播放的提示存储在 "AuditoryCues.playList" 中。
audioAction - 知道如何呈现与系统或要发生的用户活动相关联的音频的 Action
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。