APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.basic

public Class BasicMenuUI

extends BasicMenuItemUI
Class Inheritance
Known Direct Subclasses
javax.swing.plaf.synth.SynthMenuUI, com.sun.java.swing.plaf.motif.MotifMenuUI
Imports
sun.swing.DefaultLookup, .UIAction, java.awt.*, java.awt.event.*, java.beans.*, javax.swing.*, javax.swing.event.*, javax.swing.plaf.*, javax.swing.border.*, java.util.Arrays, .ArrayList

A default L&F implementation of MenuUI. This implementation is a "combined" view/controller.
Authors
Georges Saab, David Karlton, Arnaud Weber

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public class
BasicMenuUI.ChangeHandler

As of Java 2 platform 1.4, this previously undocumented class is now obsolete.

private class
protected class
BasicMenuUI.MouseInputHandler

Instantiated and used by a menu item to handle the current menu selection from mouse events.

Field Summary

Modifier and TypeField and Description
protected ChangeListener
changeListener

The instance of ChangeListener.

private static boolean
private static final boolean
private int
private InputMap
selectedWindowInputMap

Uses as the parent of the windowInputMap when selected.

private static final boolean
private static final boolean
Inherited from javax.swing.plaf.basic.BasicMenuItemUI:
acceleratorDelimiteracceleratorFontacceleratorForegroundacceleratorSelectionForegroundarrowIconcheckIcondefaultTextIconGapdisabledForegroundhandlermenuDragMouseListenermenuItemmenuKeyListenermouseInputListeneroldBorderPaintedpropertyChangeListenerselectionBackgroundselectionForeground

Constructor Summary

AccessConstructor and Description
public
BasicMenuUI()

Constructs a BasicMenuUI.

Method Summary

Modifier and TypeMethod and Description
private static void
protected ChangeListener

Returns:

an instance of ChangeListener
createChangeListener
(JComponent
a component
c
)

Returns an instance of ChangeListener.

protected MenuDragMouseListener
protected MenuKeyListener
protected MenuListener

Returns:

an instance of MenuListener
createMenuListener
(JComponent
a component
c
)

Returns an instance of MenuListener.

protected MouseInputListener
protected PropertyChangeListener
createPropertyChangeListener(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.createPropertyChangeListener.

Creates a PropertyChangeListener which will be added to the menu item.

public static ComponentUI

Returns:

a new instance of BasicMenuUI
createUI
(JComponent
a component
x
)

Hides javax.swing.plaf.basic.BasicMenuItemUI.createUI.

Constructs a new instance of BasicMenuUI.

pack-priv BasicMenuItemUI.Handler
public Dimension
getMaximumSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.getMaximumSize.

Returns the specified component's maximum size appropriate for the look and feel.

public Dimension
getMinimumSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.getMinimumSize.

Returns the specified component's minimum size appropriate for the look and feel.

protected String
protected void
protected void
pack-priv void
protected void
pack-priv static void
protected void
setupPostTimer(JMenu
an instance of JMenu.
menu
)

Sets timer to the menu.

protected void
protected void
protected void
private void
pack-priv void
Inherited from javax.swing.plaf.basic.BasicMenuItemUI:
createInputMapdoClickdoNotCloseOnMouseClickgetPathgetPreferredMenuItemSizegetPreferredSizeinstallComponentsinstallUIpaintpaintBackgroundpaintMenuItempaintTextprintMenuElementArrayuninstallComponentsuninstallUIupdateupdateAcceleratorBinding

Field Detail

changeListenerback to summary
protected ChangeListener changeListener

The instance of ChangeListener.

crossMenuMnemonicback to summary
private static boolean crossMenuMnemonic
DEBUGback to summary
private static final boolean DEBUG

Hides javax.swing.plaf.basic.BasicMenuItemUI.DEBUG.

lastMnemonicback to summary
private int lastMnemonic
selectedWindowInputMapback to summary
private InputMap selectedWindowInputMap

Uses as the parent of the windowInputMap when selected.

TRACEback to summary
private static final boolean TRACE

Hides javax.swing.plaf.basic.BasicMenuItemUI.TRACE.

VERBOSEback to summary
private static final boolean VERBOSE

Hides javax.swing.plaf.basic.BasicMenuItemUI.VERBOSE.

Constructor Detail

BasicMenuUIback to summary
public BasicMenuUI()

Constructs a BasicMenuUI.

Method Detail

appendPathback to summary
private static void appendPath(MenuElement[] path, MenuElement elem)
createChangeListenerback to summary
protected ChangeListener createChangeListener(JComponent c)

Returns an instance of ChangeListener.

Parameters
c:JComponent

a component

Returns:ChangeListener

an instance of ChangeListener

createMenuDragMouseListenerback to summary
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.createMenuDragMouseListener.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.createMenuDragMouseListener.

Returns an instance of MenuDragMouseListener.

createMenuKeyListenerback to summary
protected MenuKeyListener createMenuKeyListener(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.createMenuKeyListener.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.createMenuKeyListener.

Returns an instance of MenuKeyListener.

createMenuListenerback to summary
protected MenuListener createMenuListener(JComponent c)

Returns an instance of MenuListener.

Parameters
c:JComponent

a component

Returns:MenuListener

an instance of MenuListener

createMouseInputListenerback to summary
protected MouseInputListener createMouseInputListener(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.createMouseInputListener.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.createMouseInputListener.

Returns an instance of MouseInputListener.

createPropertyChangeListenerback to summary
protected PropertyChangeListener createPropertyChangeListener(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.createPropertyChangeListener.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.createPropertyChangeListener.

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.

createUIback to summary
public static ComponentUI createUI(JComponent x)

Hides javax.swing.plaf.basic.BasicMenuItemUI.createUI.

Constructs a new instance of BasicMenuUI.

Parameters
x:JComponent

a component

Returns:ComponentUI

a new instance of BasicMenuUI

getHandlerback to summary
pack-priv BasicMenuItemUI.Handler getHandler()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.getHandler.

getMaximumSizeback to summary
public Dimension getMaximumSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.getMaximumSize.

Doc from javax.swing.plaf.ComponentUI.getMaximumSize.

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.

getMinimumSizeback to summary
public Dimension getMinimumSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.getMinimumSize.

Doc from javax.swing.plaf.ComponentUI.getMinimumSize.

Returns the specified component's minimum size appropriate for the look and feel. If null is returned, the minimum 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.

getPropertyPrefixback to summary
protected String getPropertyPrefix()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix.

Returns a property prefix.

installDefaultsback to summary
protected void installDefaults()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.installDefaults.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.installDefaults.

Installs default properties.

installKeyboardActionsback to summary
protected void installKeyboardActions()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.installKeyboardActions.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.installKeyboardActions.

Registers keyboard action.

installLazyActionMapback to summary
pack-priv void installLazyActionMap()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.installLazyActionMap.

installListenersback to summary
protected void installListeners()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.installListeners.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.installListeners.

Registers listeners.

loadActionMapback to summary
pack-priv static void loadActionMap(LazyActionMap map)

Hides javax.swing.plaf.basic.BasicMenuItemUI.loadActionMap.

setupPostTimerback to summary
protected void setupPostTimer(JMenu menu)

Sets timer to the menu.

Parameters
menu:JMenu

an instance of JMenu.

uninstallDefaultsback to summary
protected void uninstallDefaults()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.uninstallDefaults.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.uninstallDefaults.

Uninstalls default properties.

uninstallKeyboardActionsback to summary
protected void uninstallKeyboardActions()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.uninstallKeyboardActions.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.uninstallKeyboardActions.

Unregisters keyboard actions.

uninstallListenersback to summary
protected void uninstallListeners()

Overrides javax.swing.plaf.basic.BasicMenuItemUI.uninstallListeners.

Doc from javax.swing.plaf.basic.BasicMenuItemUI.uninstallListeners.

Unregisters listeners.

updateDefaultBackgroundColorback to summary
private void updateDefaultBackgroundColor()
updateMnemonicBindingback to summary
pack-priv void updateMnemonicBinding()
Annotations
@SuppressWarnings:deprecation
javax.swing.plaf.basic back to summary

private Class BasicMenuUI.Actions

extends UIAction
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean
private JMenu
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv
Actions(String key, JMenu menu, boolean shouldForce)

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(Object c)

Overrides sun.swing.UIAction.accept.

Overrides default javax.swing.Action.accept.

Subclasses that need to conditionalize the enabled state should override this.

public void
actionPerformed(ActionEvent e)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

private JMenu
Inherited from sun.swing.UIAction:
addPropertyChangeListenergetNamegetValueisEnabledputValueremovePropertyChangeListenersetEnabled

Field Detail

forceback to summary
private boolean force
menuback to summary
private JMenu menu
SELECTback to summary
private static final String SELECT

Constructor Detail

Actionsback to summary
pack-priv Actions(String key, JMenu menu, boolean shouldForce)

Method Detail

acceptback to summary
public boolean accept(Object c)

Overrides sun.swing.UIAction.accept.

Overrides default javax.swing.Action.accept.

Doc from sun.swing.UIAction.accept.

Subclasses that need to conditionalize the enabled state should override this. Be aware that sender may be null.

Annotations
@Override
actionPerformedback to summary
public void actionPerformed(ActionEvent e)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

getMenuback to summary
private JMenu getMenu(ActionEvent e)
javax.swing.plaf.basic back to summary

public Class BasicMenuUI.ChangeHandler

extends Object
implements ChangeListener
Class Inheritance
All Implemented Interfaces
javax.swing.event.ChangeListener, java.util.EventListener
Known Direct Subclasses
com.sun.java.swing.plaf.motif.MotifMenuUI.MotifChangeHandler

As of Java 2 platform 1.4, this previously undocumented class is now obsolete. KeyBindings are now managed by the popup menu.

Field Summary

Modifier and TypeField and Description
public boolean
isSelected

true if an item of popup menu is selected.

public JMenu
menu

The instance of JMenu.

public BasicMenuUI
ui

The instance of BasicMenuUI.

public Component
wasFocused

The component that was focused.

Constructor Summary

AccessConstructor and Description
public
ChangeHandler(JMenu
an instance of JMenu
m
,
BasicMenuUI
an instance of BasicMenuUI
ui
)

Constructs a new instance of ChangeHandler.

Method Summary

Modifier and TypeMethod and Description
public void
stateChanged(ChangeEvent e)

Implements javax.swing.event.ChangeListener.stateChanged.

Invoked when the target of the listener has changed its state.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isSelectedback to summary
public boolean isSelected

true if an item of popup menu is selected.

menuback to summary
public JMenu menu

The instance of JMenu.

uiback to summary
public BasicMenuUI ui

The instance of BasicMenuUI.

wasFocusedback to summary
public Component wasFocused

The component that was focused.

Constructor Detail

ChangeHandlerback to summary
public ChangeHandler(JMenu m, BasicMenuUI ui)

Constructs a new instance of ChangeHandler.

Parameters
m:JMenu

an instance of JMenu

ui:BasicMenuUI

an instance of BasicMenuUI

Method Detail

stateChangedback to summary
public void stateChanged(ChangeEvent e)

Implements javax.swing.event.ChangeListener.stateChanged.

Doc from javax.swing.event.ChangeListener.stateChanged.

Invoked when the target of the listener has changed its state.

javax.swing.plaf.basic back to summary

private Class BasicMenuUI.Handler

extends Handler
implements MenuKeyListener
Class Inheritance
All Implemented Interfaces
javax.swing.event.MenuKeyListener, java.util.EventListener

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
public void
menuKeyPressed(MenuKeyEvent e)

Implements javax.swing.event.MenuKeyListener.menuKeyPressed.

Invoked when a key has been pressed.

public void
menuKeyReleased(MenuKeyEvent e)

Implements javax.swing.event.MenuKeyListener.menuKeyReleased.

Invoked when a key has been released.

public void
public void
mouseClicked(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseClicked.

Implements java.awt.event.MouseListener.mouseClicked.

Invoked when the mouse button has been clicked (pressed and released) on a component.

public void
mouseDragged(MouseEvent
the mouse event
e
)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseDragged.

Implements java.awt.event.MouseMotionListener.mouseDragged.

Invoked when a mouse button is pressed on the menu and then dragged.

public void
mouseEntered(MouseEvent
the mouse event; not used
e
)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseEntered.

Implements java.awt.event.MouseListener.mouseEntered.

Invoked when the cursor enters the menu.

public void
public void
mouseMoved(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseMoved.

Implements java.awt.event.MouseMotionListener.mouseMoved.

Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

public void
mousePressed(MouseEvent
the mouse event
e
)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mousePressed.

Implements java.awt.event.MouseListener.mousePressed.

Invoked when the mouse has been clicked on the menu.

public void
mouseReleased(MouseEvent
the mouse event
e
)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseReleased.

Implements java.awt.event.MouseListener.mouseReleased.

Invoked when the mouse has been released on the menu.

public void

Constructor Detail

Handlerback to summary
private Handler()

Method Detail

menuDragMouseDraggedback to summary
public void menuDragMouseDragged(MenuDragMouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.menuDragMouseDragged.

Implements javax.swing.event.MenuDragMouseListener.menuDragMouseDragged.

Doc from javax.swing.event.MenuDragMouseListener.menuDragMouseDragged.

Invoked when the mouse is being dragged in a menu component's display area.

menuDragMouseEnteredback to summary
public void menuDragMouseEntered(MenuDragMouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.menuDragMouseEntered.

Implements javax.swing.event.MenuDragMouseListener.menuDragMouseEntered.

Doc from javax.swing.event.MenuDragMouseListener.menuDragMouseEntered.

Invoked when the dragged mouse has entered a menu component's display area.

menuDragMouseExitedback to summary
public void menuDragMouseExited(MenuDragMouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.menuDragMouseExited.

Implements javax.swing.event.MenuDragMouseListener.menuDragMouseExited.

Doc from javax.swing.event.MenuDragMouseListener.menuDragMouseExited.

Invoked when the dragged mouse has left a menu component's display area.

menuDragMouseReleasedback to summary
public void menuDragMouseReleased(MenuDragMouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.menuDragMouseReleased.

Implements javax.swing.event.MenuDragMouseListener.menuDragMouseReleased.

Doc from javax.swing.event.MenuDragMouseListener.menuDragMouseReleased.

Invoked when a dragged mouse is release in a menu component's display area.

menuKeyPressedback to summary
public void menuKeyPressed(MenuKeyEvent e)

Implements javax.swing.event.MenuKeyListener.menuKeyPressed.

Doc from javax.swing.event.MenuKeyListener.menuKeyPressed.

Invoked when a key has been pressed.

menuKeyReleasedback to summary
public void menuKeyReleased(MenuKeyEvent e)

Implements javax.swing.event.MenuKeyListener.menuKeyReleased.

Doc from javax.swing.event.MenuKeyListener.menuKeyReleased.

Invoked when a key has been released.

menuKeyTypedback to summary
public void menuKeyTyped(MenuKeyEvent e)

Implements javax.swing.event.MenuKeyListener.menuKeyTyped.

Open the Menu

mouseClickedback to summary
public void mouseClicked(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseClicked.

Implements java.awt.event.MouseListener.mouseClicked.

Doc from java.awt.event.MouseListener.mouseClicked.

Invoked when the mouse button has been clicked (pressed and released) on a component.

mouseDraggedback to summary
public void mouseDragged(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseDragged.

Implements java.awt.event.MouseMotionListener.mouseDragged.

Invoked when a mouse button is pressed on the menu and then dragged. Delegates the mouse event to the MenuSelectionManager.

Parameters
e:MouseEvent

the mouse event

See Also
java.awt.event.MouseMotionListener#mouseDragged
mouseEnteredback to summary
public void mouseEntered(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseEntered.

Implements java.awt.event.MouseListener.mouseEntered.

Invoked when the cursor enters the menu. This method sets the selected path for the MenuSelectionManager and handles the case in which a menu item is used to pop up an additional menu, as in a hierarchical menu system.

Parameters
e:MouseEvent

the mouse event; not used

mouseExitedback to summary
public void mouseExited(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseExited.

Implements java.awt.event.MouseListener.mouseExited.

Doc from java.awt.event.MouseListener.mouseExited.

Invoked when the mouse exits a component.

mouseMovedback to summary
public void mouseMoved(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseMoved.

Implements java.awt.event.MouseMotionListener.mouseMoved.

Doc from java.awt.event.MouseMotionListener.mouseMoved.

Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

mousePressedback to summary
public void mousePressed(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mousePressed.

Implements java.awt.event.MouseListener.mousePressed.

Invoked when the mouse has been clicked on the menu. This method clears or sets the selection path of the MenuSelectionManager.

Parameters
e:MouseEvent

the mouse event

mouseReleasedback to summary
public void mouseReleased(MouseEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.mouseReleased.

Implements java.awt.event.MouseListener.mouseReleased.

Invoked when the mouse has been released on the menu. Delegates the mouse event to the MenuSelectionManager.

Parameters
e:MouseEvent

the mouse event

propertyChangeback to summary
public void propertyChange(PropertyChangeEvent e)

Overrides javax.swing.plaf.basic.BasicMenuItemUI.Handler.propertyChange.

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

javax.swing.plaf.basic back to summary

protected Class BasicMenuUI.MouseInputHandler

extends Object
implements MouseInputListener
Class Inheritance
All Implemented Interfaces
javax.swing.event.MouseInputListener, java.awt.event.MouseMotionListener, java.util.EventListener, java.awt.event.MouseListener

Instantiated and used by a menu item to handle the current menu selection from mouse events. A MouseInputHandler processes and forwards all mouse events to a shared instance of the MenuSelectionManager.

This class is protected so that it can be subclassed by other look and feels to implement their own mouse handling behavior. All overridden methods should call the parent methods so that the menu selection is correct.

Since
1.4
See Also
javax.swing.MenuSelectionManager

Constructor Summary

AccessConstructor and Description
protected
MouseInputHandler()

Constructs a MouseInputHandler.

Method Summary

Modifier and TypeMethod and Description
public void
mouseClicked(MouseEvent e)

Implements java.awt.event.MouseListener.mouseClicked.

Invoked when the mouse button has been clicked (pressed and released) on a component.

public void
mouseDragged(MouseEvent
the mouse event
e
)

Implements java.awt.event.MouseMotionListener.mouseDragged.

Invoked when a mouse button is pressed on the menu and then dragged.

public void
mouseEntered(MouseEvent
the mouse event; not used
e
)

Implements java.awt.event.MouseListener.mouseEntered.

Invoked when the cursor enters the menu.

public void
mouseExited(MouseEvent e)

Implements java.awt.event.MouseListener.mouseExited.

Invoked when the mouse exits a component.

public void
mouseMoved(MouseEvent e)

Implements java.awt.event.MouseMotionListener.mouseMoved.

Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

public void
mousePressed(MouseEvent
the mouse event
e
)

Implements java.awt.event.MouseListener.mousePressed.

Invoked when the mouse has been clicked on the menu.

public void
mouseReleased(MouseEvent
the mouse event
e
)

Implements java.awt.event.MouseListener.mouseReleased.

Invoked when the mouse has been released on the menu.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MouseInputHandlerback to summary
protected MouseInputHandler()

Constructs a MouseInputHandler.

Method Detail

mouseClickedback to summary
public void mouseClicked(MouseEvent e)

Implements java.awt.event.MouseListener.mouseClicked.

Doc from java.awt.event.MouseListener.mouseClicked.

Invoked when the mouse button has been clicked (pressed and released) on a component.

mouseDraggedback to summary
public void mouseDragged(MouseEvent e)

Implements java.awt.event.MouseMotionListener.mouseDragged.

Invoked when a mouse button is pressed on the menu and then dragged. Delegates the mouse event to the MenuSelectionManager.

Parameters
e:MouseEvent

the mouse event

See Also
java.awt.event.MouseMotionListener#mouseDragged
mouseEnteredback to summary
public void mouseEntered(MouseEvent e)

Implements java.awt.event.MouseListener.mouseEntered.

Invoked when the cursor enters the menu. This method sets the selected path for the MenuSelectionManager and handles the case in which a menu item is used to pop up an additional menu, as in a hierarchical menu system.

Parameters
e:MouseEvent

the mouse event; not used

mouseExitedback to summary
public void mouseExited(MouseEvent e)

Implements java.awt.event.MouseListener.mouseExited.

Doc from java.awt.event.MouseListener.mouseExited.

Invoked when the mouse exits a component.

mouseMovedback to summary
public void mouseMoved(MouseEvent e)

Implements java.awt.event.MouseMotionListener.mouseMoved.

Doc from java.awt.event.MouseMotionListener.mouseMoved.

Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

mousePressedback to summary
public void mousePressed(MouseEvent e)

Implements java.awt.event.MouseListener.mousePressed.

Invoked when the mouse has been clicked on the menu. This method clears or sets the selection path of the MenuSelectionManager.

Parameters
e:MouseEvent

the mouse event

mouseReleasedback to summary
public void mouseReleased(MouseEvent e)

Implements java.awt.event.MouseListener.mouseReleased.

Invoked when the mouse has been released on the menu. Delegates the mouse event to the MenuSelectionManager.

Parameters
e:MouseEvent

the mouse event