public class MetalSeparatorUI extends BasicSeparatorUI
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans包。请看XMLEncoder。
highlight, shadow| Constructor and Description |
|---|
MetalSeparatorUI() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent c) |
Dimension |
getPreferredSize(JComponent c)
返回指定组件的首选大小适合的外观和感觉。
|
protected void |
installDefaults(JSeparator s) |
void |
paint(Graphics g, JComponent c)
适当地绘制指定的组件的外观和感觉。
|
getMaximumSize, getMinimumSize, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, updatepublic static ComponentUI createUI(JComponent c)
protected void installDefaults(JSeparator s)
installDefaults 方法重写,继承类
BasicSeparatorUI
public void paint(Graphics g, JComponent c)
ComponentUI
ComponentUI.update方法调用时指定的组件正在粉刷。子类应重写此方法,并使用指定的
Graphics对象呈现的成分含量。
paint 方法重写,继承类
BasicSeparatorUI
g -其中
Graphics背景画
c -正在绘制的构件;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public Dimension getPreferredSize(JComponent c)
ComponentUI
null返回,首选大小将由组件的布局管理器的计算(这是与一个特定的布局管理器安装任何组件的首选方法)。此方法的默认实现将返回
null。
getPreferredSize 方法重写,继承类
BasicSeparatorUI
c优先度的被查询的成分;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
JComponent.getPreferredSize(),
LayoutManager.preferredLayoutSize(java.awt.Container)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.