public class MetalMenuBarUI extends BasicMenuBarUI
MenuBarUI金属实现。这个类负责提供金属的外观和感觉的
JMenuBars。
MenuBarUI
changeListener, containerListener, menuBar| Constructor and Description |
|---|
MetalMenuBarUI() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent x)
创建了组件的
ComponentUI实施。
|
void |
installUI(JComponent c)
配置指定的组件适合金属的外观和感觉。
|
void |
uninstallUI(JComponent c)
逆转形态,完成指定的组件在
installUI。
|
void |
update(Graphics g, JComponent c)
如果需要油漆的组件的背景,然后调用
paint。
|
createChangeListener, createContainerListener, getMaximumSize, getMinimumSize, installDefaults, installKeyboardActions, installListeners, uninstallDefaults, uninstallKeyboardActions, uninstallListenerscontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getPreferredSize, paintpublic static ComponentUI createUI(JComponent x)
ComponentUI实施。
x -组件创建ComponentUI实现
x ComponentUI实现
NullPointerException -如果
x是空的
public void installUI(JComponent c)
installUI 方法重写,继承类
BasicMenuBarUI
c -组件,UI代理被安装
NullPointerException -如果
c是空的。
ComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()
public void uninstallUI(JComponent c)
installUI。
uninstallUI 方法重写,继承类
BasicMenuBarUI
c -组件,UI代理被安装
NullPointerException -如果
c是空的。
ComponentUI.installUI(javax.swing.JComponent),
JComponent.updateUI()
public void update(Graphics g, JComponent c)
paint。
update 方法重写,继承类
ComponentUI
g图形绘
c - JComponent绘画
NullPointerException -如果
g或
c是空的
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent),
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
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.