Spec-Zone .ru
спецификации, руководства, описания, API
Please note that the specifications and other information contained herein are not final and are subject to change. The information is being made available to you solely for purpose of evaluation.

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

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

Metal implementation of MenuBarUI. This class is responsible for providing the metal look and feel for JMenuBars.

Since:
1.5
See Also:
MenuBarUI

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class javax.swing.plaf.basic.BasicMenuBarUI
changeListener, containerListener, menuBar
 
Constructor Summary
Constructor and Description
MetalMenuBarUI()
           
 
Method Summary
Modifier and Type Method and Description
static ComponentUI createUI(JComponent x)
          Creates the ComponentUI implementation for the passed in component.
 void installUI(JComponent c)
          Configures the specified component appropriate for the metal look and feel.
 void uninstallUI(JComponent c)
          Reverses configuration which was done on the specified component during installUI.
 void update(Graphics g, JComponent c)
          If necessary paints the background of the component, then invokes paint.
 
Methods inherited from class javax.swing.plaf.basic.BasicMenuBarUI
createChangeListener, createContainerListener, getMaximumSize, getMinimumSize, installDefaults, installKeyboardActions, installListeners, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getPreferredSize, 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 x)
Creates the ComponentUI implementation for the passed in component.

Parameters:
x - JComponent to create the ComponentUI implementation for
Returns:
ComponentUI implementation for x
Throws:
NullPointerException - if x is null

installUI

public void installUI(JComponent c)
Configures the specified component appropriate for the metal look and feel.

Overrides:
installUI in class BasicMenuBarUI
Parameters:
c - the component where this UI delegate is being installed
Throws:
NullPointerException - if c is null.
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent c)
Reverses configuration which was done on the specified component during installUI.

Overrides:
uninstallUI in class BasicMenuBarUI
Parameters:
c - the component where this UI delegate is being installed
Throws:
NullPointerException - if c is null.
See Also:
ComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()

update

public void update(Graphics g,
                   JComponent c)
If necessary paints the background of the component, then invokes paint.

Overrides:
update in class ComponentUI
Parameters:
g - Graphics to paint to
c - JComponent painting on
Throws:
NullPointerException - if g or c is null
Since:
1.5
See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent), ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 1993, 2010, Oracle Corporation. All rights reserved.
DRAFT ea-b118

Scripting on this page tracks web page traffic, but does not change the content in any way.