java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ViewportUI
javax.swing.plaf.basic.BasicViewportUI
public class BasicViewportUI
BasicViewport 实现
| 构造方法摘要 | |
|---|---|
BasicViewportUI() |
|
| 方法摘要 | |
|---|---|
static ComponentUI |
createUI(JComponent c) |
protected void |
installDefaults(JComponent c) |
void |
installUI(JComponent c) 配置指定组件,使其适合外观。 |
protected void |
uninstallDefaults(JComponent c) |
void |
uninstallUI(JComponent c) 在 installUI 期间,在指定组件上反向执行的配置操作。 |
| 从类 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 BasicViewportUI()
| 方法详细信息 |
|---|
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI 复制的描述
ComponentUI 实例将作为 UI 委托安装在指定组件上时,可调用此方法。此方法应该为外观完整地配置组件,包括以下方面:
LayoutManager。 PropertyChangeListener。
ComponentUI 中的
installUI
c - 将安装此 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 中的
uninstallUI
c - 从中移除此 UI 委托的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
ComponentUI.installUI(javax.swing.JComponent),
JComponent.updateUI()
protected void installDefaults(JComponent c)
protected void uninstallDefaults(JComponent c)