javax.swing.plaf.basic
public class BasicMenuBarUI extends MenuBarUI
| Field Summary | |
|---|---|
| protected ChangeListener | changeListener |
| protected ContainerListener | containerListener |
| protected JMenuBar | menuBar |
| Constructor Summary | |
|---|---|
| BasicMenuBarUI()
Creates a new BasicMenuBarUI object. | |
| Method Summary | |
|---|---|
| protected ChangeListener | createChangeListener()
Creates ChangeListener
|
| protected ContainerListener | createContainerListener()
Creates ContainerListener() to listen for ContainerEvents
fired by JMenuBar.
|
| static ComponentUI | createUI(JComponent x)
Factory method to create a BasicMenuBarUI for the given {@link
JComponent}, which should be a {@link JMenuBar}.
|
| Dimension | getMaximumSize(JComponent c)
Returns maximum size for the specified menu bar
|
| Dimension | getMinimumSize(JComponent c)
Returns maximum allowed size of JMenuBar.
|
| Dimension | getPreferredSize(JComponent c)
Returns preferred size of JMenuBar.
|
| protected void | installDefaults()
Initializes any default properties that this UI has from the defaults for
the Basic look and feel. |
| protected void | installKeyboardActions()
This method installs the keyboard actions for the JMenuBar. |
| protected void | installListeners()
This method installs the listeners needed for this UI to function. |
| void | installUI(JComponent c)
Installs and initializes all fields for this UI delegate. |
| protected void | uninstallDefaults()
This method uninstalls the defaults and nulls any objects created during
install. |
| protected void | uninstallKeyboardActions()
This method reverses the work done in installKeyboardActions. |
| protected void | uninstallListeners()
Unregisters all the listeners that this UI delegate was using. |
| void | uninstallUI(JComponent c)
Performs the opposite of installUI. |
Returns: The ChangeListener
Returns: The ContainerListener
Parameters: x The {@link JComponent} a UI is being created for.
Returns: A BasicMenuBarUI for the {@link JComponent}.
Parameters: c component for which to get maximum size
Returns: Maximum size for the specified menu bar
Parameters: c menuBar for which to return maximum size
Returns: Maximum size of the give menu bar.
Parameters: c menuBar for which to return preferred size
Returns: Preferred size of the give menu bar.
Parameters: c The {@link JComponent} that is having this UI installed.
Parameters: c The {@link JComponent} that is having this UI uninstalled.