java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.MenuBarUI
javax.swing.plaf.basic.BasicMenuBarUI
javax.swing.plaf.metal.MetalMenuBarUI
Metal implementation of
MenuBarUI
. This class is responsible
for providing the metal look and feel for JMenuBar
s.- Since:
- 1.5
- See Also:
MenuBarUI
-
Field Summary
Fields declared in class javax.swing.plaf.basic.BasicMenuBarUI
changeListener, containerListener, menuBar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUI
createUI(JComponent x)
Creates theComponentUI
implementation for the passed in component.void
installUI(JComponent c)
Configures the specified component appropriate for the metal look and feel.void
Reverses configuration which was done on the specified component duringinstallUI
.void
update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokespaint
.Methods declared in class javax.swing.plaf.basic.BasicMenuBarUI
createChangeListener, createContainerListener, installDefaults, installKeyboardActions, installListeners, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint
-
Constructor Details
-
MetalMenuBarUI
public MetalMenuBarUI()Constructs aMetalMenuBarUI
.
-
-
Method Details
-
createUI
Creates theComponentUI
implementation for the passed in component.- Parameters:
x
- JComponent to create the ComponentUI implementation for- Returns:
- ComponentUI implementation for
x
- Throws:
NullPointerException
- ifx
is null
-
installUI
Configures the specified component appropriate for the metal look and feel.- Overrides:
installUI
in classComponentUI
- Parameters:
c
- the component where this UI delegate is being installed- Throws:
NullPointerException
- ifc
is null.- See Also:
ComponentUI.uninstallUI(javax.swing.JComponent)
,JComponent.setUI(javax.swing.plaf.ComponentUI)
,JComponent.updateUI()
-
uninstallUI
Reverses configuration which was done on the specified component duringinstallUI
.- Overrides:
uninstallUI
in classComponentUI
- Parameters:
c
- the component where this UI delegate is being installed- Throws:
NullPointerException
- ifc
is null.- See Also:
ComponentUI.installUI(javax.swing.JComponent)
,JComponent.updateUI()
-
update
If necessary paints the background of the component, then invokespaint
.- Overrides:
update
in classComponentUI
- Parameters:
g
- Graphics to paint toc
- JComponent painting on- Throws:
NullPointerException
- ifg
orc
is null- Since:
- 1.5
- See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
,ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
-