javax.swing.plaf.basic
public class BasicMenuUI extends BasicMenuItemUI
Nested Class Summary | |
---|---|
class | BasicMenuUI.ChangeHandler
Obsolete as of JDK1.4. |
protected class | BasicMenuUI.MouseInputHandler
This class is used by menus to handle mouse events occuring in the
menu. |
Field Summary | |
---|---|
protected ChangeListener | changeListener |
protected MenuListener | menuListener |
protected PropertyChangeListener | propertyChangeListener |
Constructor Summary | |
---|---|
BasicMenuUI()
Creates a new BasicMenuUI object. |
Method Summary | |
---|---|
protected ChangeListener | createChangeListener(JComponent c)
This method creates a new ChangeListener.
|
protected MenuDragMouseListener | createMenuDragMouseListener(JComponent c)
This method creates new MenuDragMouseListener to listen to mouse dragged events
occuring in the Menu
|
protected MenuKeyListener | createMenuKeyListener(JComponent c)
This method creates new MenuDragKeyListener to listen to key events
|
protected MenuListener | createMenuListener(JComponent c)
This method creates new MenuListener to listen to menu events
occuring in the Menu
|
protected MouseInputListener | createMouseInputListener(JComponent c)
This method creates new MouseInputListener to listen to mouse input events
occuring in the Menu
|
protected PropertyChangeListener | createPropertyChangeListener(JComponent c)
This method creates newPropertyChangeListener to listen to property changes
occuring in the Menu
|
static ComponentUI | createUI(JComponent c)
This method creates a new BasicMenuUI.
|
Dimension | getMaximumSize(JComponent c)
Get the component's maximum size.
|
protected String | getPropertyPrefix()
Returns the prefix for entries in the {@link UIDefaults} table.
|
protected void | installDefaults()
Initializes any default properties that this UI has from the defaults for
the Basic look and feel. |
protected void | installKeyboardActions()
Installs any keyboard actions. |
protected void | installListeners()
Creates and registers all the listeners for this UI delegate. |
protected void | setupPostTimer(JMenu menu) |
protected void | uninstallDefaults()
This method uninstalls the defaults and sets any objects created during
install to null |
protected void | uninstallKeyboardActions()
Uninstalls any keyboard actions. |
protected void | uninstallListeners()
Unregisters all the listeners that this UI delegate was using. |
Returns: A new ChangeListener.
Parameters: c the menu to listen to
Returns: The MenuDrageMouseListener
Parameters: c the menu to listen to
Returns: The MenuKeyListener
Parameters: c the menu to listen to
Returns: The MenuListener
Parameters: c the menu to listen to
Returns: The MouseInputListener
Parameters: c the menu to listen to
Returns: The PropertyChangeListener
Parameters: c The JComponent to create a UI for.
Returns: A new BasicMenuUI.
Parameters: c The JComponent for which to get maximum size
Returns: The maximum size of the component
Returns: "Menu"