public class MetalPopupMenuSeparatorUI extends MetalSeparatorUI
highlight, shadow| Constructor and Description |
|---|
MetalPopupMenuSeparatorUI() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent c) |
Dimension |
getPreferredSize(JComponent c)
返回指定组件的偏好大小,适合外观和感觉。
|
void |
paint(Graphics g, JComponent c)
适当地涂抹指定的组件的外观和感觉。
|
installDefaultsgetMaximumSize, getMinimumSize, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, updatepublic static ComponentUI createUI(JComponent c)
public void paint(Graphics g, JComponent c)
ComponentUI复制
ComponentUI.update指定组件正在被绘制时的方法。
子类应该覆盖此方法,并使用指定的Graphics对象来呈现Graphics的内容。
paint在
MetalSeparatorUI
g - 要绘画的
Graphics上下文
c - 正在画的部件
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public Dimension getPreferredSize(JComponent c)
ComponentUI
null ,则首选的大小将由组件的布局管理器计算(这是安装了特定布局管理器的任何组件的首选方法)。
此方法的默认实现返回null 。
getPreferredSize在类
MetalSeparatorUI
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.