public class BasicMenuBarUI extends javax.swing.plaf.MenuBarUI
| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.event.ChangeListener |
changeListener |
protected java.awt.event.ContainerListener |
containerListener |
protected javax.swing.JMenuBar |
menuBar |
| Constructor and Description |
|---|
BasicMenuBarUI()
Creates a new BasicMenuBarUI object.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.swing.event.ChangeListener |
createChangeListener()
Creates ChangeListener
|
protected java.awt.event.ContainerListener |
createContainerListener()
Creates ContainerListener() to listen for ContainerEvents
fired by JMenuBar.
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent x)
Factory method to create a BasicMenuBarUI for the given
JComponent, which should be a JMenuBar. |
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c)
Returns maximum size for the specified menu bar
|
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c)
Returns maximum allowed size of JMenuBar.
|
java.awt.Dimension |
getPreferredSize(javax.swing.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(javax.swing.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(javax.swing.JComponent c)
Performs the opposite of installUI.
|
protected javax.swing.event.ChangeListener changeListener
protected java.awt.event.ContainerListener containerListener
protected javax.swing.JMenuBar menuBar
public BasicMenuBarUI()
protected javax.swing.event.ChangeListener createChangeListener()
protected java.awt.event.ContainerListener createContainerListener()
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
JComponent, which should be a JMenuBar.x - The JComponent a UI is being created for.JComponent.public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
getMaximumSize in class javax.swing.plaf.ComponentUIc - component for which to get maximum sizepublic java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
getMinimumSize in class javax.swing.plaf.ComponentUIc - menuBar for which to return maximum sizepublic java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize in class javax.swing.plaf.ComponentUIc - menuBar for which to return preferred sizeprotected void installDefaults()
protected void installKeyboardActions()
protected void installListeners()
public void installUI(javax.swing.JComponent c)
installUI in class javax.swing.plaf.ComponentUIc - The JComponent that is having this UI installed.ComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()protected void uninstallDefaults()
protected void uninstallKeyboardActions()
protected void uninstallListeners()
public void uninstallUI(javax.swing.JComponent c)
uninstallUI in class javax.swing.plaf.ComponentUIc - The JComponent that is having this UI uninstalled.ComponentUI.installUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()