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 JMenuBars.- Since:
- 1.5
- See Also:
-
Field Summary
Fields declared in class javax.swing.plaf.basic.BasicMenuBarUI
changeListener, containerListener, menuBar -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUICreates theComponentUIimplementation for the passed in component.voidConfigures the specified component appropriate for the metal look and feel.voidReverses configuration which was done on the specified component duringinstallUI.voidupdate(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, uninstallListenersMethods 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 theComponentUIimplementation for the passed in component.- Parameters:
x- JComponent to create the ComponentUI implementation for- Returns:
- ComponentUI implementation for
x - Throws:
NullPointerException- ifxis null
-
installUI
Configures the specified component appropriate for the metal look and feel.- Overrides:
installUIin classComponentUI- Parameters:
c- the component where this UI delegate is being installed- Throws:
NullPointerException- ifcis null.- See Also:
-
uninstallUI
Reverses configuration which was done on the specified component duringinstallUI.- Overrides:
uninstallUIin classComponentUI- Parameters:
c- the component where this UI delegate is being installed- Throws:
NullPointerException- ifcis null.- See Also:
-
update
If necessary paints the background of the component, then invokespaint.- Overrides:
updatein classComponentUI- Parameters:
g- Graphics to paint toc- JComponent painting on- Throws:
NullPointerException- ifgorcis null- Since:
- 1.5
- See Also:
-