|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.RootPaneUI
javax.swing.plaf.basic.BasicRootPaneUI
javax.swing.plaf.metal.MetalRootPaneUI
public class MetalRootPaneUI
提供 RootPaneUI 的 metal 外观实现。
MetalRootPaneUI 提供对 JRootPane 的 windowDecorationStyle 属性的支持。MetalRootPaneUI 通过安装一个自定义 LayoutManager、一个呈现适当窗口小部件的私有 Component 和一个私有 Border 来做到这一点。不管 windowDecorationStyle 属性的值如何,总是要安装 LayoutManager,但 Border 和 Component 只在 windowDecorationStyle 不是 JRootPane.NONE 时才被安装/添加。
警告:此类的已序列化对象与以后的 Swing 版本不兼容。当前序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder。
| 构造方法摘要 | |
|---|---|
MetalRootPaneUI()
|
|
| 方法摘要 | |
|---|---|
static ComponentUI |
createUI(JComponent c)
为 JRootPane 创建一个 UI。 |
void |
installUI(JComponent c)
调用 installUI 的超实现来在传入的 JRootPane 上安装必要的状态,以呈现 RootPaneUI 的 metal 外观实现。 |
void |
propertyChange(PropertyChangeEvent e)
属性更改时调用。 |
void |
uninstallUI(JComponent c)
调用超实现来卸载所有状态。 |
| 从类 javax.swing.plaf.basic.BasicRootPaneUI 继承的方法 |
|---|
installComponents, installDefaults, installKeyboardActions, installListeners, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners |
| 从类 javax.swing.plaf.ComponentUI 继承的方法 |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public MetalRootPaneUI()
| 方法详细信息 |
|---|
public static ComponentUI createUI(JComponent c)
JRootPane 创建一个 UI。
c - 将为其创建 RootPaneUI 的 JRootPane
public void installUI(JComponent c)
installUI 的超实现来在传入的 JRootPane 上安装必要的状态,以呈现 RootPaneUI 的 metal 外观实现。如果 JRootPane 的 windowDecorationStyle 属性不是 JRootPane.NONE,则此方法将添加一个自定义 Component 来将窗口小部件呈现给 JRootPane,并在 JRootPane 上安装一个自定义 Border 和 LayoutManager。
BasicRootPaneUI 中的 installUIc - 在其上安装状态的 JRootPaneComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()public void uninstallUI(JComponent c)
JRootPane 的 LayoutManager。如果已经将 Component 添加到 JRootPane 中来呈现窗口装饰风格,则此方法将移除它。类似地,此方法会将 JRootPane 的 Border 和 LayoutManager 恢复为调用 installUI 前的样子。
BasicRootPaneUI 中的 uninstallUIc - 从其中卸载状态的 JRootPaneComponentUI.installUI(javax.swing.JComponent),
JComponent.updateUI()public void propertyChange(PropertyChangeEvent e)
MetalRootPaneUI 主要用于源自 JRootPane(已安装它来标识属性 windowDecorationStyle)的事件。如果 windowDecorationStyle 已经更改为不是 JRootPane.NONE 的某个值,则此方法会向 JRootPane 添加一个 Component 来呈现窗口装饰,并在 JRootPane 上安装一个 Border。另一方面,如果 windowDecorationStyle 已更改为 JRootPane.NONE,则此方法将移除已添加到 JRootPane 中的 Component,并将 Border 重置回调用 installUI 以前的样子。
PropertyChangeListener 中的 propertyChangeBasicRootPaneUI 中的 propertyChangee - 描述事件源和已更改的属性的 PropertyChangeEvent 对象。
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。