java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.PanelUI
javax.swing.plaf.basic.BasicPanelUI
public class BasicPanelUI
BasicPanel 实现
| 构造方法摘要 | |
|---|---|
BasicPanelUI() |
|
| 方法摘要 | |
|---|---|
static ComponentUI |
createUI(JComponent c) |
int |
getBaseline(JComponent c, int width, int height) 返回基线。 |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c) 返回一个枚举,它指示该组件的基线如何随大小的改变而发生更改。 |
protected void |
installDefaults(JPanel p) |
void |
installUI(JComponent c) 配置指定组件,使其适合外观。 |
protected void |
uninstallDefaults(JPanel p) |
void |
uninstallUI(JComponent c) 在 installUI 期间,在指定组件上反向执行的配置操作。 |
| 从类 javax.swing.plaf.ComponentUI 继承的方法 |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public BasicPanelUI()
| 方法详细信息 |
|---|
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(JPanel p)
protected void uninstallDefaults(JPanel p)
public int getBaseline(JComponent c, int width, int height)
ComponentUI 中的
getBaseline
c - 为其请求基线的
JComponent
width - 为其获取基线的宽度
height - 为其获取基线的高度
NullPointerException - 如果
c 为
null
IllegalArgumentException - 如果宽度或高度 < 0
JComponent.getBaseline(int, int)
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
ComponentUI 中的
getBaselineResizeBehavior
c - 为其返回调整大小行为的
JComponent
NullPointerException - 如果
c 为
null
JComponent.getBaseline(int, int)