public class MetalMenuBarUI extends BasicMenuBarUI
MenuBarUI
. This class is responsible for providing the metal look and feel for JMenuBar
s.changeListener, containerListener, menuBar
Constructor | Description |
---|---|
MetalMenuBarUI() |
Constructs a MetalMenuBarUI . |
Modifier and Type | Method | Description |
---|---|---|
static ComponentUI |
createUI |
Creates the ComponentUI implementation for the passed in component. |
void |
installUI |
Configures the specified component appropriate for the metal look and feel. |
void |
uninstallUI |
Reverses configuration which was done on the specified component during installUI . |
void |
update |
If necessary paints the background of the component, then invokes paint . |
createChangeListener, createContainerListener, installDefaults, installKeyboardActions, installListeners, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint
public MetalMenuBarUI()
MetalMenuBarUI
.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 ComponentUI
c
- the component where this UI delegate is being installedNullPointerException
- if c
is null.public void uninstallUI(JComponent c)
installUI
.uninstallUI
in class ComponentUI
c
- the component where this UI delegate is being installedNullPointerException
- if c
is null.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 null
© 1993, 2023, 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.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/metal/MetalMenuBarUI.html