public class MetalMenuBarUI extends BasicMenuBarUI
MenuBarUI
. This class is responsible
for providing the metal look and feel for JMenuBar
s.MenuBarUI
changeListener, containerListener, menuBar
Constructor and Description |
---|
MetalMenuBarUI() |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent x)
Creates the
ComponentUI implementation for the passed
in component. |
void |
installUI(JComponent c)
Configures the specified component appropriate for the metal look and
feel.
|
void |
uninstallUI(JComponent c)
Reverses configuration which was done on the specified component during
installUI . |
void |
update(Graphics g,
JComponent c)
If necessary paints the background of the component, then
invokes
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
implementation for the passed
in component.x
- JComponent to create the ComponentUI implementation forx
NullPointerException
- if x
is nullpublic void installUI(JComponent c)
installUI
in class BasicMenuBarUI
c
- the component where this UI delegate is being installedNullPointerException
- if c
is null.ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
installUI
.uninstallUI
in class BasicMenuBarUI
c
- the component where this UI delegate is being installedNullPointerException
- if c
is null.ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
public void update(Graphics g, JComponent c)
paint
.update
in class ComponentUI
g
- Graphics to paint toc
- JComponent painting onNullPointerException
- if g
or c
is
nullComponentUI.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, 2019, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.