|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.MenuBarUI
javax.swing.plaf.basic.BasicMenuBarUI
public class BasicMenuBarUI
UI Delegate for JMenuBar.
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 JComponent , which should be a 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. |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ChangeListener changeListener
protected ContainerListener containerListener
protected JMenuBar menuBar
Constructor Detail |
---|
public BasicMenuBarUI()
Method Detail |
---|
protected ChangeListener createChangeListener()
protected ContainerListener createContainerListener()
public static ComponentUI createUI(JComponent x)
JComponent
, which should be a JMenuBar
.
x
- The JComponent
a UI is being created for.
JComponent
.public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class ComponentUI
c
- component for which to get maximum size
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class ComponentUI
c
- menuBar for which to return maximum size
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI
c
- menuBar for which to return preferred size
protected void installDefaults()
protected void installKeyboardActions()
protected void installListeners()
public void installUI(JComponent c)
installUI
in class ComponentUI
c
- 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(JComponent c)
uninstallUI
in class ComponentUI
c
- The JComponent
that is having this UI uninstalled.ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |