javax.swing.plaf.metal
Class MetalMenuBarUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.MenuBarUI
javax.swing.plaf.basic.BasicMenuBarUI
javax.swing.plaf.metal.MetalMenuBarUI
public class MetalMenuBarUI
- extends BasicMenuBarUI
A UI implementation for MenuBar in the Metal Look & Feel.
- Since:
- 1.5
Method Summary |
static ComponentUI |
createUI(JComponent c)
Creates and returns a new instance of this UI for the specified component. |
void |
update(Graphics g,
JComponent c)
If the property MenuBar.gradient is set, then a gradient
is painted as background, otherwise the normal superclass behaviour is
called. |
Methods inherited from class javax.swing.plaf.basic.BasicMenuBarUI |
createChangeListener, createContainerListener, getMaximumSize, getMinimumSize, getPreferredSize, installDefaults, installKeyboardActions, installListeners, installUI, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetalMenuBarUI
public MetalMenuBarUI()
createUI
public static ComponentUI createUI(JComponent c)
- Creates and returns a new instance of this UI for the specified component.
- Parameters:
c
- the component to create a UI for
- Returns:
- the UI for the component
update
public void update(Graphics g,
JComponent c)
- If the property
MenuBar.gradient
is set, then a gradient
is painted as background, otherwise the normal superclass behaviour is
called.
- Overrides:
update
in class ComponentUI
- Parameters:
g
- the graphics for painting.c
- the component for which this delegate performs
services.- See Also:
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
,
JComponent.paintComponent(java.awt.Graphics)