public class BasicMenuUI extends BasicMenuItemUI
A default L&F implementation of MenuUI. This implementation is a "combined" view/controller.
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. |
protected ChangeListener changeListener
protected MenuListener menuListener
public BasicMenuUI()
public static ComponentUI createUI(JComponent x)
protected void installDefaults()
installDefaults
in class BasicMenuItemUI
protected String getPropertyPrefix()
getPropertyPrefix
in class BasicMenuItemUI
protected void installListeners()
installListeners
in class BasicMenuItemUI
protected void installKeyboardActions()
installKeyboardActions
in class BasicMenuItemUI
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class BasicMenuItemUI
protected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener
in class BasicMenuItemUI
protected MenuListener createMenuListener(JComponent c)
protected ChangeListener createChangeListener(JComponent c)
protected PropertyChangeListener createPropertyChangeListener(JComponent c)
Description copied from class: BasicMenuItemUI
Creates a PropertyChangeListener
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 BasicMenuItemUI
PropertyChangeListener
or nullprotected void uninstallDefaults()
uninstallDefaults
in class BasicMenuItemUI
protected void uninstallListeners()
uninstallListeners
in class BasicMenuItemUI
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
createMenuDragMouseListener
in class BasicMenuItemUI
protected MenuKeyListener createMenuKeyListener(JComponent c)
createMenuKeyListener
in class BasicMenuItemUI
public Dimension getMaximumSize(JComponent c)
Description copied from class: ComponentUI
Returns the specified component's maximum size appropriate for the look and feel. If null
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 BasicMenuItemUI
c
- 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 null
JComponent.getMaximumSize()
, LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void setupPostTimer(JMenu menu)
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.