public class MetalMenuBarUI extends BasicMenuBarUI
MenuBarUI
。
这个类是负责提供金属外观和感觉为JMenuBar
秒。
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中反转在
installUI 上完成的
installUI 。
|
void |
update(Graphics g, JComponent c)
如果需要涂抹组件的背景,然后调用
paint 。
|
createChangeListener, createContainerListener, getMaximumSize, getMinimumSize, installDefaults, installKeyboardActions, installListeners, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getPreferredSize, paint
public static ComponentUI createUI(JComponent x)
ComponentUI
实施的组件通过。
x
- 用于创建ComponentUI实现的JComponent
x
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
上完成的
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.