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 |
protected MenuListener |
menuListener |
acceleratorDelimiter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, propertyChangeListener, selectionBackground, selectionForeground
Constructor and Description |
---|
BasicMenuUI() |
doClick, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, update
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
protected ChangeListener changeListener
protected MenuListener menuListener
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)
BasicMenuItemUI
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)
ComponentUI
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)
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, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.