public class BasicMenuUI extends BasicMenuItemUI
| Modifier and Type | Class and Description |
|---|---|
class |
BasicMenuUI.ChangeHandler
As of Java 2 platform 1.4, this previously undocumented class
is now obsolete.
|
protected class |
BasicMenuUI.MouseInputHandler
Instantiated and used by a menu item to handle the current menu selection
from mouse events.
|
| Modifier and Type | Field and Description |
|---|---|
protected ChangeListener |
changeListener
The instance of
ChangeListener. |
protected MenuListener |
menuListener
The instance of
MenuListener. |
acceleratorDelimiter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, propertyChangeListener, selectionBackground, selectionForeground| Constructor and Description |
|---|
BasicMenuUI() |
| Modifier and Type | Method and Description |
|---|---|
protected ChangeListener |
createChangeListener(JComponent c)
Returns an instance of
ChangeListener. |
protected MenuDragMouseListener |
createMenuDragMouseListener(JComponent c)
Returns an instance of
MenuDragMouseListener. |
protected MenuKeyListener |
createMenuKeyListener(JComponent c)
Returns an instance of
MenuKeyListener. |
protected MenuListener |
createMenuListener(JComponent c)
Returns an instance of
MenuListener. |
protected MouseInputListener |
createMouseInputListener(JComponent c)
Returns an instance of
MouseInputListener. |
protected PropertyChangeListener |
createPropertyChangeListener(JComponent c)
Creates a
PropertyChangeListener which will be added to
the menu item. |
static ComponentUI |
createUI(JComponent x)
Constructs a new instance of
BasicMenuUI. |
Dimension |
getMaximumSize(JComponent c)
Returns the specified component's maximum size appropriate for
the look and feel.
|
protected String |
getPropertyPrefix()
Returns a property prefix.
|
protected void |
installDefaults()
Installs default properties.
|
protected void |
installKeyboardActions()
Registers keyboard action.
|
protected void |
installListeners()
Registers listeners.
|
protected void |
setupPostTimer(JMenu menu)
Sets timer to the
menu. |
protected void |
uninstallDefaults()
Uninstalls default properties.
|
protected void |
uninstallKeyboardActions()
Unregisters keyboard actions.
|
protected void |
uninstallListeners()
Unregisters listeners.
|
doClick, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, updatecontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehaviorprotected ChangeListener changeListener
ChangeListener.protected MenuListener menuListener
MenuListener.public static ComponentUI createUI(JComponent x)
BasicMenuUI.x - a componentBasicMenuUIprotected void installDefaults()
BasicMenuItemUIinstallDefaults in class BasicMenuItemUIprotected String getPropertyPrefix()
BasicMenuItemUIgetPropertyPrefix in class BasicMenuItemUIprotected void installListeners()
BasicMenuItemUIinstallListeners in class BasicMenuItemUIprotected void installKeyboardActions()
BasicMenuItemUIinstallKeyboardActions in class BasicMenuItemUIprotected void uninstallKeyboardActions()
BasicMenuItemUIuninstallKeyboardActions in class BasicMenuItemUIprotected MouseInputListener createMouseInputListener(JComponent c)
BasicMenuItemUIMouseInputListener.createMouseInputListener in class BasicMenuItemUIc - a componentMouseInputListenerprotected MenuListener createMenuListener(JComponent c)
MenuListener.c - a componentMenuListenerprotected ChangeListener createChangeListener(JComponent c)
ChangeListener.c - a componentChangeListenerprotected PropertyChangeListener createPropertyChangeListener(JComponent c)
BasicMenuItemUIPropertyChangeListener which will be added to
the menu item.
If this method returns null then it will not be added to the menu item.createPropertyChangeListener in class BasicMenuItemUIc - a componentPropertyChangeListener or nullprotected void uninstallDefaults()
BasicMenuItemUIuninstallDefaults in class BasicMenuItemUIprotected void uninstallListeners()
BasicMenuItemUIuninstallListeners in class BasicMenuItemUIprotected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
BasicMenuItemUIMenuDragMouseListener.createMenuDragMouseListener in class BasicMenuItemUIc - a componentMenuDragMouseListenerprotected MenuKeyListener createMenuKeyListener(JComponent c)
BasicMenuItemUIMenuKeyListener.createMenuKeyListener in class BasicMenuItemUIc - a componentMenuKeyListenerpublic Dimension getMaximumSize(JComponent c)
ComponentUInull is returned, the maximum
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method invokes getPreferredSize and returns that value.getMaximumSize in class BasicMenuItemUIc - the component whose maximum size is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsDimension object or nullJComponent.getMaximumSize(),
LayoutManager2.maximumLayoutSize(java.awt.Container)protected void setupPostTimer(JMenu menu)
menu.menu - an instance of JMenu. Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait