A MenuShortcut is used to associate a keystroke with a menu item. MenuShortcuts are constructed using their corresponding key; they are associated with menu items via MenuItem.setShortcut(MenuShortcut).
public class java.awt.MenuShortcut extends java.awt.Event { // Constructors public MenuShortcut (int key); public MenuShortcut (int key, boolean useShiftModifier); // Instance Methods public boolean equals (MenuShortcut s); public int getKey(); public String toString(); public boolean usesShiftModifier(); // Protected Instance Methods protected String paramString(); }
A keycode like those returned with key press Event objects.
Constructs a MenuShortcut object for the given key.
A keycode like those returned with key press Event objects.
true if the Shift key must be used, false otherwise.
Constructs a MenuShortcut object with the given values.
The MenuShortcut to compare.
true if s is equal to this MenuShortcut, false otherwise.
The key for this MenuShortcut.
A string representation of the MenuShortcut object.
Event.toString()
true if this MenuShortcut must be invoked with the Shift key pressed, false otherwise.
String with current settings of MenuShortcut.
Event.paramString()
Helper method for toString() to generate string of current settings.
Event, MenuItem
This HTML Help has been published using the chm2web software. |