javax.swing.plaf.metal
Class MetalMenuBarUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.MenuBarUI
          extended by javax.swing.plaf.basic.BasicMenuBarUI
              extended by javax.swing.plaf.metal.MetalMenuBarUI

public class MetalMenuBarUI
extends BasicMenuBarUI

A UI implementation for MenuBar in the Metal Look & Feel.

Since:
1.5

Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicMenuBarUI
changeListener, containerListener, menuBar
 
Constructor Summary
MetalMenuBarUI()
           
 
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 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetalMenuBarUI

public MetalMenuBarUI()
Method Detail

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)