public class MetalMenuBarUI extends BasicMenuBarUI
Metal implementation of MenuBarUI
. This class is responsible for providing the metal look and feel for JMenuBar
s.
MenuBarUI
changeListener, containerListener, menuBar
public MetalMenuBarUI()
public static ComponentUI createUI(JComponent x)
Creates the ComponentUI
implementation for the passed in component.
x
- JComponent to create the ComponentUI implementation forx
NullPointerException
- if x
is nullpublic void installUI(JComponent c)
Configures the specified component appropriate for the metal look and feel.
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)
Reverses configuration which was done on the specified component during 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)
If necessary paints the background of the component, then invokes 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)
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.