- java.lang.Object
-
- java.util.EventObject
-
- java.awt.AWTEvent
-
- java.awt.event.ComponentEvent
-
- java.awt.event.InputEvent
-
- java.awt.event.KeyEvent
-
- javax.swing.event.MenuKeyEvent
-
- 实现的所有接口
-
Serializable
public class MenuKeyEvent extends KeyEvent
MenuKeyEvent用于通知感兴趣的各方菜单元素已在菜单树中收到转发给它的KeyEvent。警告:此类的序列化对象与以后的Swing版本不兼容。 当前的序列化支持适用于运行相同版本Swing的应用程序之间的短期存储或RMI。 从1.4开始,
java.beans
软件包中添加了对所有JavaBeansjava.beans
长期存储的支持。 请参阅XMLEncoder
。- 另请参见:
- Serialized Form
-
-
字段汇总
-
声明的属性在类 java.awt.event.KeyEvent
CHAR_UNDEFINED, KEY_FIRST, KEY_LAST, KEY_LOCATION_LEFT, KEY_LOCATION_NUMPAD, KEY_LOCATION_RIGHT, KEY_LOCATION_STANDARD, KEY_LOCATION_UNKNOWN, KEY_PRESSED, KEY_RELEASED, KEY_TYPED, VK_0, VK_1, VK_2, VK_3, VK_4, VK_5, VK_6, VK_7, VK_8, VK_9, VK_A, VK_ACCEPT, VK_ADD, VK_AGAIN, VK_ALL_CANDIDATES, VK_ALPHANUMERIC, VK_ALT, VK_ALT_GRAPH, VK_AMPERSAND, VK_ASTERISK, VK_AT, VK_B, VK_BACK_QUOTE, VK_BACK_SLASH, VK_BACK_SPACE, VK_BEGIN, VK_BRACELEFT, VK_BRACERIGHT, VK_C, VK_CANCEL, VK_CAPS_LOCK, VK_CIRCUMFLEX, VK_CLEAR, VK_CLOSE_BRACKET, VK_CODE_INPUT, VK_COLON, VK_COMMA, VK_COMPOSE, VK_CONTEXT_MENU, VK_CONTROL, VK_CONVERT, VK_COPY, VK_CUT, VK_D, VK_DEAD_ABOVEDOT, VK_DEAD_ABOVERING, VK_DEAD_ACUTE, VK_DEAD_BREVE, VK_DEAD_CARON, VK_DEAD_CEDILLA, VK_DEAD_CIRCUMFLEX, VK_DEAD_DIAERESIS, VK_DEAD_DOUBLEACUTE, VK_DEAD_GRAVE, VK_DEAD_IOTA, VK_DEAD_MACRON, VK_DEAD_OGONEK, VK_DEAD_SEMIVOICED_SOUND, VK_DEAD_TILDE, VK_DEAD_VOICED_SOUND, VK_DECIMAL, VK_DELETE, VK_DIVIDE, VK_DOLLAR, VK_DOWN, VK_E, VK_END, VK_ENTER, VK_EQUALS, VK_ESCAPE, VK_EURO_SIGN, VK_EXCLAMATION_MARK, VK_F, VK_F1, VK_F10, VK_F11, VK_F12, VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F2, VK_F20, VK_F21, VK_F22, VK_F23, VK_F24, VK_F3, VK_F4, VK_F5, VK_F6, VK_F7, VK_F8, VK_F9, VK_FINAL, VK_FIND, VK_FULL_WIDTH, VK_G, VK_GREATER, VK_H, VK_HALF_WIDTH, VK_HELP, VK_HIRAGANA, VK_HOME, VK_I, VK_INPUT_METHOD_ON_OFF, VK_INSERT, VK_INVERTED_EXCLAMATION_MARK, VK_J, VK_JAPANESE_HIRAGANA, VK_JAPANESE_KATAKANA, VK_JAPANESE_ROMAN, VK_K, VK_KANA, VK_KANA_LOCK, VK_KANJI, VK_KATAKANA, VK_KP_DOWN, VK_KP_LEFT, VK_KP_RIGHT, VK_KP_UP, VK_L, VK_LEFT, VK_LEFT_PARENTHESIS, VK_LESS, VK_M, VK_META, VK_MINUS, VK_MODECHANGE, VK_MULTIPLY, VK_N, VK_NONCONVERT, VK_NUM_LOCK, VK_NUMBER_SIGN, VK_NUMPAD0, VK_NUMPAD1, VK_NUMPAD2, VK_NUMPAD3, VK_NUMPAD4, VK_NUMPAD5, VK_NUMPAD6, VK_NUMPAD7, VK_NUMPAD8, VK_NUMPAD9, VK_O, VK_OPEN_BRACKET, VK_P, VK_PAGE_DOWN, VK_PAGE_UP, VK_PASTE, VK_PAUSE, VK_PERIOD, VK_PLUS, VK_PREVIOUS_CANDIDATE, VK_PRINTSCREEN, VK_PROPS, VK_Q, VK_QUOTE, VK_QUOTEDBL, VK_R, VK_RIGHT, VK_RIGHT_PARENTHESIS, VK_ROMAN_CHARACTERS, VK_S, VK_SCROLL_LOCK, VK_SEMICOLON, VK_SEPARATER, VK_SEPARATOR, VK_SHIFT, VK_SLASH, VK_SPACE, VK_STOP, VK_SUBTRACT, VK_T, VK_TAB, VK_U, VK_UNDEFINED, VK_UNDERSCORE, VK_UNDO, VK_UP, VK_V, VK_W, VK_WINDOWS, VK_X, VK_Y, VK_Z
-
声明的属性在类 java.awt.event.InputEvent
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK
-
声明的属性在类 java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
-
声明的属性在类 java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
-
声明的属性在类 java.util.EventObject
source
-
-
构造方法摘要
构造方法 构造器 描述 MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
构造一个MenuKeyEvent对象。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 MenuSelectionManager
getMenuSelectionManager()
返回当前菜单选择管理器。MenuElement[]
getPath()
返回此事件引用的菜单项的路径。-
声明方法的类 java.awt.event.KeyEvent
getExtendedKeyCode, getExtendedKeyCodeForChar, getKeyChar, getKeyCode, getKeyLocation, getKeyModifiersText, getKeyText, isActionKey, paramString, setKeyChar, setKeyCode, setModifiers
-
声明方法的类 java.awt.event.InputEvent
consume, getMaskForButton, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
-
声明方法的类 java.awt.event.ComponentEvent
getComponent
-
声明方法的类 java.util.EventObject
getSource
-
-
-
-
构造方法详细信息
-
MenuKeyEvent
public MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
构造一个MenuKeyEvent对象。- 参数
-
source
- 发起事件的组件(通常为this
) -
id
- 指定事件类型的int,如KeyEvent
中所定义 -
when
- 识别事件发生时间的长 -
modifiers
- 指定按下的任何修改键的int,如InputEvent
中所指定 -
keyCode
- 指定已按下的特定键的int -
keyChar
- 指定键的字符值的char(如果有) - 如果键没有字符值,则为null -
p
- 一个MenuElement对象数组,指定受拖动影响的菜单项的路径 -
m
- 处理选择的MenuSelectionManager对象
-
-
方法详细信息
-
getPath
public MenuElement[] getPath()
返回此事件引用的菜单项的路径。- 结果
- 表示路径值的MenuElement对象数组
-
getMenuSelectionManager
public MenuSelectionManager getMenuSelectionManager()
返回当前菜单选择管理器。- 结果
- a MenuSelectionManager object
-
-