public class BasicMenuUI extends BasicMenuItemUI
| Modifier and Type | Class and Description |
|---|---|
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.
|
| Modifier and Type | Field and Description |
|---|---|
protected ChangeListener |
changeListener |
protected MenuListener |
menuListener |
protected PropertyChangeListener |
propertyChangeListener |
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground| Constructor and Description |
|---|
BasicMenuUI()
Creates a new BasicMenuUI object.
|
| Modifier and Type | Method and Description |
|---|---|
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
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.
|
doClick, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, updatecontains, getAccessibleChild, getAccessibleChildrenCountprotected ChangeListener changeListener
protected MenuListener menuListener
protected PropertyChangeListener propertyChangeListener
public BasicMenuUI()
protected ChangeListener createChangeListener(JComponent c)
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
createMenuDragMouseListener in class BasicMenuItemUIc - the menu to listen toprotected MenuKeyListener createMenuKeyListener(JComponent c)
createMenuKeyListener in class BasicMenuItemUIc - the menu to listen toprotected MenuListener createMenuListener(JComponent c)
c - the menu to listen toprotected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener in class BasicMenuItemUIc - the menu to listen toprotected PropertyChangeListener createPropertyChangeListener(JComponent c)
c - the menu to listen topublic static ComponentUI createUI(JComponent c)
c - The JComponent to create a UI for.public Dimension getMaximumSize(JComponent c)
getMaximumSize in class BasicMenuItemUIc - The JComponent for which to get maximum sizeprotected String getPropertyPrefix()
UIDefaults table.getPropertyPrefix in class BasicMenuItemUIprotected void installDefaults()
installDefaults in class BasicMenuItemUIprotected void installKeyboardActions()
installKeyboardActions in class BasicMenuItemUIprotected void installListeners()
installListeners in class BasicMenuItemUIprotected void setupPostTimer(JMenu menu)
protected void uninstallDefaults()
uninstallDefaults in class BasicMenuItemUIprotected void uninstallKeyboardActions()
uninstallKeyboardActions in class BasicMenuItemUIprotected void uninstallListeners()
uninstallListeners in class BasicMenuItemUI