Top Description Fields Constructors Methods
javax.swing.plaf.metal

public Class MetalMenuBarUI

extends BasicMenuBarUI
Class Inheritance
Imports
java.awt.*, javax.swing.*, javax.swing.plaf.ComponentUI, .UIResource, javax.swing.plaf.basic.*

Metal implementation of MenuBarUI. This class is responsible for providing the metal look and feel for JMenuBars.
Since
1.5
See Also
javax.swing.plaf.MenuBarUI

Field Summary

Inherited from javax.swing.plaf.basic.BasicMenuBarUI:
changeListenercontainerListenermenuBar

Constructor Summary

AccessConstructor and Description
public
MetalMenuBarUI()

Constructs a MetalMenuBarUI.

Method Summary

Modifier and TypeMethod and Description
public static ComponentUI

Returns:

ComponentUI implementation for x
createUI
(JComponent
JComponent to create the ComponentUI implementation for
x
)

Hides javax.swing.plaf.basic.BasicMenuBarUI.createUI.

Creates the ComponentUI implementation for the passed in component.
public void
installUI(JComponent
the component where this UI delegate is being installed
c
)

Overrides javax.swing.plaf.basic.BasicMenuBarUI.installUI.

Configures the specified component appropriate for the metal look and feel.
public void
uninstallUI(JComponent
the component where this UI delegate is being installed
c
)

Overrides javax.swing.plaf.basic.BasicMenuBarUI.uninstallUI.

Reverses configuration which was done on the specified component during installUI.
public void
update(Graphics
Graphics to paint to
g
,
JComponent
JComponent painting on
c
)

Overrides javax.swing.plaf.ComponentUI.update.

If necessary paints the background of the component, then invokes paint.
Inherited from javax.swing.plaf.basic.BasicMenuBarUI:
createChangeListenercreateContainerListenergetMaximumSizegetMinimumSizeinstallDefaultsinstallKeyboardActionsinstallListenersuninstallDefaultsuninstallKeyboardActionsuninstallListeners

Constructor Detail

MetalMenuBarUIback to summary
public MetalMenuBarUI()

Constructs a MetalMenuBarUI.

Method Detail

createUIback to summary
public static ComponentUI createUI(JComponent x)

Hides javax.swing.plaf.basic.BasicMenuBarUI.createUI.

Creates the ComponentUI implementation for the passed in component.

Parameters
x:JComponent

JComponent to create the ComponentUI implementation for

Returns:ComponentUI

ComponentUI implementation for x

Exceptions
NullPointerException:
if x is null
installUIback to summary
public void installUI(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuBarUI.installUI.

Configures the specified component appropriate for the metal look and feel.

Parameters
c:JComponent

the component where this UI delegate is being installed

Exceptions
NullPointerException:
if c is null.
uninstallUIback to summary
public void uninstallUI(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuBarUI.uninstallUI.

Reverses configuration which was done on the specified component during installUI.

Parameters
c:JComponent

the component where this UI delegate is being installed

Exceptions
NullPointerException:
if c is null.
updateback to summary
public void update(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.update.

If necessary paints the background of the component, then invokes paint.

Parameters
g:Graphics

Graphics to paint to

c:JComponent

JComponent painting on

Exceptions
NullPointerException:
if g or c is null
Since
1.5
See Also
javax.swing.plaf.ComponentUI#update, javax.swing.plaf.ComponentUI#paint