59 public class MenuShortcut implements java.io.Serializable
60 {
61 /**
62 * The virtual keycode for the menu shortcut.
63 * This is the keycode with which the menu shortcut will be created.
64 * Note that it is a virtual keycode, not a character,
65 * e.g. KeyEvent.VK_A, not 'a'.
66 * Note: in 1.1.x you must use setActionCommand() on a menu item
67 * in order for its shortcut to work, otherwise it will fire a null
68 * action command.
69 *
70 * @serial
71 * @see #getKey()
72 * @see #usesShiftModifier()
73 * @see java.awt.event.KeyEvent
74 * @since 1.1
75 */
76 int key;
77
78 /**
79 * Indicates whether the shft key was pressed.
80 * If true, the shift key was pressed.
81 * If false, the shift key was not pressed
82 *
83 * @serial
84 * @see #usesShiftModifier()
85 * @since 1.1
86 */
87 boolean usesShift;
88
89 /*
90 * JDK 1.1 serialVersionUID
91 */
92 private static final long serialVersionUID = 143448358473180225L;
93
94 /**
95 * Constructs a new MenuShortcut for the specified virtual keycode.
96 * @param key the raw keycode for this MenuShortcut, as would be returned
97 * in the keyCode field of a {@link java.awt.event.KeyEvent KeyEvent} if
98 * this key were pressed.
99 * @see java.awt.event.KeyEvent
|
59 public class MenuShortcut implements java.io.Serializable
60 {
61 /**
62 * The virtual keycode for the menu shortcut.
63 * This is the keycode with which the menu shortcut will be created.
64 * Note that it is a virtual keycode, not a character,
65 * e.g. KeyEvent.VK_A, not 'a'.
66 * Note: in 1.1.x you must use setActionCommand() on a menu item
67 * in order for its shortcut to work, otherwise it will fire a null
68 * action command.
69 *
70 * @serial
71 * @see #getKey()
72 * @see #usesShiftModifier()
73 * @see java.awt.event.KeyEvent
74 * @since 1.1
75 */
76 int key;
77
78 /**
79 * Indicates whether the shift key was pressed.
80 * If true, the shift key was pressed.
81 * If false, the shift key was not pressed
82 *
83 * @serial
84 * @see #usesShiftModifier()
85 * @since 1.1
86 */
87 boolean usesShift;
88
89 /*
90 * JDK 1.1 serialVersionUID
91 */
92 private static final long serialVersionUID = 143448358473180225L;
93
94 /**
95 * Constructs a new MenuShortcut for the specified virtual keycode.
96 * @param key the raw keycode for this MenuShortcut, as would be returned
97 * in the keyCode field of a {@link java.awt.event.KeyEvent KeyEvent} if
98 * this key were pressed.
99 * @see java.awt.event.KeyEvent
|