| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.SeparatorUI
javax.swing.plaf.basic.BasicSeparatorUI
public class BasicSeparatorUI
SeparatorUI 的基本 L&F 实现。此实现是一个“组合的”视图/控制器。
| 字段摘要 | |
|---|---|
| protected  Color | highlight | 
| protected  Color | shadow | 
| 构造方法摘要 | |
|---|---|
| BasicSeparatorUI() | |
| 方法摘要 | |
|---|---|
| static ComponentUI | createUI(JComponent c) | 
|  Dimension | getMaximumSize(JComponent c)返回指定组件的适合外观的最大大小。 | 
|  Dimension | getMinimumSize(JComponent c)返回指定组件的适合外观的最小大小。 | 
|  Dimension | getPreferredSize(JComponent c)返回指定组件的适合外观的首选大小。 | 
| protected  void | installDefaults(JSeparator s) | 
| protected  void | installListeners(JSeparator s) | 
|  void | installUI(JComponent c)配置指定组件,使其适合外观。 | 
|  void | paint(Graphics g,
      JComponent c)绘制指定组件,使其适合外观。 | 
| protected  void | uninstallDefaults(JSeparator s) | 
| protected  void | uninstallListeners(JSeparator s) | 
|  void | uninstallUI(JComponent c)在 installUI期间,在指定组件上反向执行的配置操作。 | 
| 从类 javax.swing.plaf.ComponentUI 继承的方法 | 
|---|
| contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| 字段详细信息 | 
|---|
protected Color shadow
protected Color highlight
| 构造方法详细信息 | 
|---|
public BasicSeparatorUI()
| 方法详细信息 | 
|---|
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI 复制的描述ComponentUI 实例将作为 UI 委托安装在指定组件上时,可调用此方法。此方法应该为外观完整地配置组件,包括以下方面:
 LayoutManager。
PropertyChangeListener。
ComponentUI 中的 installUIc - 将安装此 UI 委托的组件ComponentUI.uninstallUI(javax.swing.JComponent), 
JComponent.setUI(javax.swing.plaf.ComponentUI), 
JComponent.updateUI()public void uninstallUI(JComponent c)
ComponentUI 复制的描述installUI 期间,在指定组件上反向执行的配置操作。当此 UIComponent 实例将作为 UI 委托从指定组件上移除时,可调用此方法。此方法应该取消在 installUI 中执行的配置操作,非常小心地使 JComponent 实例处于某种洁净状态(没有额外的侦听器、没有特定于外观的属性对象等等)。配置内容应该包括以下方面:
 
ComponentUI 中的 uninstallUIc - 从中移除此 UI 委托的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数ComponentUI.installUI(javax.swing.JComponent), 
JComponent.updateUI()protected void installDefaults(JSeparator s)
protected void uninstallDefaults(JSeparator s)
protected void installListeners(JSeparator s)
protected void uninstallListeners(JSeparator s)
public void paint(Graphics g,
                  JComponent c)
ComponentUI 复制的描述ComponentUI.update 方法中调用此方法。子类应该重写此方法并使用指定 Graphics 对象来呈现组件的内容。
ComponentUI 中的 paintg - 将在其中进行绘制的 Graphics 上下文c - 将绘制的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)public Dimension getPreferredSize(JComponent c)
ComponentUI 复制的描述null,则首选大小将由组件的布局管理器计算(对于安装了特定布局管理器的组件而言,这是首选方法)。此方法的默认实现返回 null。
ComponentUI 中的 getPreferredSizec - 将查询其首选大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数JComponent.getPreferredSize(), 
LayoutManager.preferredLayoutSize(java.awt.Container)public Dimension getMinimumSize(JComponent c)
ComponentUI 复制的描述null,则最小大小将由组件的布局管理器计算(对于安装了特定布局管理器的组件而言,这是首选方法)。此方法的默认实现调用 getPreferredSize 并返回该值。
ComponentUI 中的 getMinimumSizec - 将查询其最小大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
Dimension 对象或 nullJComponent.getMinimumSize(), 
LayoutManager.minimumLayoutSize(java.awt.Container), 
ComponentUI.getPreferredSize(javax.swing.JComponent)public Dimension getMaximumSize(JComponent c)
ComponentUI 复制的描述null,则最大大小将由组件的布局管理器计算(对于安装了特定布局管理器的组件而言,这是首选方法)。此方法的默认实现调用 getPreferredSize 并返回该值。
ComponentUI 中的 getMaximumSizec - 将查询其最大大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
Dimension 对象或 nullJComponent.getMaximumSize(), 
LayoutManager2.maximumLayoutSize(java.awt.Container)| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。