FileDocCategorySizeDatePackage
MenuKeyEvent.javaAPI DocJava SE 5 API2813Fri Aug 26 14:58:00 BST 2005javax.swing.event

MenuKeyEvent

public class MenuKeyEvent extends KeyEvent
MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.

version
1.13 12/19/03
author
Georges Saab

Fields Summary
private MenuElement[]
path
private MenuSelectionManager
manager
Constructors Summary
public MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuKeyEvent object.

param
source the Component that originated the event (typically this)
param
id an int specifying the type of event, as defined in {@link java.awt.event.KeyEvent}
param
when a long identifying the time the event occurred
param
modifiers an int specifying any modifier keys held down, as specified in {@link java.awt.event.InputEvent}
param
keyCode an int specifying the specific key that was pressed
param
keyChar a char specifying the key's character value, if any -- null if the key has no character value
param
p an array of MenuElement objects specifying a path to a menu item affected by the drag
param
m a MenuSelectionManager object that handles selections

        super(source, id, when, modifiers, keyCode, keyChar);
	path = p;
	manager = m;
    
Methods Summary
public javax.swing.MenuSelectionManagergetMenuSelectionManager()
Returns the current menu selection manager.

return
a MenuSelectionManager object

	return manager;
    
public javax.swing.MenuElement[]getPath()
Returns the path to the menu item referenced by this event.

return
an array of MenuElement objects representing the path value

	return path;