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, update
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
protected ChangeListener changeListener
ChangeListener
.protected MenuListener menuListener
MenuListener
.public static ComponentUI createUI(JComponent x)
BasicMenuUI
.x
- a componentBasicMenuUI
protected void installDefaults()
BasicMenuItemUI
installDefaults
in class BasicMenuItemUI
protected String getPropertyPrefix()
BasicMenuItemUI
getPropertyPrefix
in class BasicMenuItemUI
protected void installListeners()
BasicMenuItemUI
installListeners
in class BasicMenuItemUI
protected void installKeyboardActions()
BasicMenuItemUI
installKeyboardActions
in class BasicMenuItemUI
protected void uninstallKeyboardActions()
BasicMenuItemUI
uninstallKeyboardActions
in class BasicMenuItemUI
protected MouseInputListener createMouseInputListener(JComponent c)
BasicMenuItemUI
MouseInputListener
.createMouseInputListener
in class BasicMenuItemUI
c
- a componentMouseInputListener
protected MenuListener createMenuListener(JComponent c)
MenuListener
.c
- a componentMenuListener
protected ChangeListener createChangeListener(JComponent c)
ChangeListener
.c
- a componentChangeListener
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
c
- a componentPropertyChangeListener
or nullprotected void uninstallDefaults()
BasicMenuItemUI
uninstallDefaults
in class BasicMenuItemUI
protected void uninstallListeners()
BasicMenuItemUI
uninstallListeners
in class BasicMenuItemUI
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
BasicMenuItemUI
MenuDragMouseListener
.createMenuDragMouseListener
in class BasicMenuItemUI
c
- a componentMenuDragMouseListener
protected MenuKeyListener createMenuKeyListener(JComponent c)
BasicMenuItemUI
MenuKeyListener
.createMenuKeyListener
in class BasicMenuItemUI
c
- a componentMenuKeyListener
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)
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