Uses of Class
javax.swing.KeyStroke
-
Packages that use KeyStroke 软件包 描述 javax.swing 提供一套“轻量级”(全Java语言)组件,尽可能地在所有平台上工作。javax.swing.plaf.basic 提供根据“基本”外观构建的用户界面对象。javax.swing.text 提供处理可编辑和不可编辑文本组件的类和接口。 -
-
Uses of KeyStroke in javax.swing
Methods in javax.swing that return KeyStroke Modifier and Type 方法 描述 KeyStroke[]
InputMap. allKeys()
返回此InputMap
及其父级中定义的KeyStroke
的数组。KeyStroke
JMenuItem. getAccelerator()
返回用作菜单项的加速器的KeyStroke
。static KeyStroke
KeyStroke. getKeyStroke(char keyChar)
返回一个KeyStroke
的共享实例,表示指定字符的KEY_TYPED
事件。static KeyStroke
KeyStroke. getKeyStroke(char keyChar, boolean onKeyRelease)
已过时。使用getKeyStroke(char)static KeyStroke
KeyStroke. getKeyStroke(int keyCode, int modifiers)
返回一个KeyStroke的共享实例,给出一个数字键代码和一组修饰符。static KeyStroke
KeyStroke. getKeyStroke(int keyCode, int modifiers, boolean onKeyRelease)
返回一个KeyStroke的共享实例,给出一个数字键代码和一组修饰符,指定按下或释放该键是否被激活。static KeyStroke
KeyStroke. getKeyStroke(Character keyChar, int modifiers)
返回KeyStroke
的共享实例,该实例表示指定的Character对象的KEY_TYPED
事件和一组修饰符。static KeyStroke
KeyStroke. getKeyStroke(String s)
解析一个字符串并返回一个KeyStroke
。static KeyStroke
KeyStroke. getKeyStrokeForEvent(KeyEvent anEvent)
返回一个KeyStroke,它表示生成给定KeyEvent的笔触。KeyStroke[]
JComponent. getRegisteredKeyStrokes()
返回将启动注册操作的KeyStrokes
。KeyStroke[]
InputMap. keys()
返回此KeyStroke
中绑定的InputMap
。Methods in javax.swing with parameters of type KeyStroke Modifier and Type 方法 描述 Object
InputMap. get(KeyStroke keyStroke)
返回keyStroke
的绑定,如果绑定未在本地定义,则发送消息传递父节点InputMap
。ActionListener
JComponent. getActionForKeyStroke(KeyStroke aKeyStroke)
返回将执行为给定键击注册的操作的对象。int
JComponent. getConditionForKeyStroke(KeyStroke aKeyStroke)
返回确定是否发生注册的操作以响应指定的击键的条件。static boolean
SwingUtilities. notifyAction(Action action, KeyStroke ks, KeyEvent event, Object sender, int modifiers)
如果action
非null
并且接受发件人对象,action
调用actionPerformed
上的action
。protected boolean
JComboBox. processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
调用ks
作为KeyEvent
e
的结果处理密钥绑定。protected boolean
JComponent. processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
调用ks
的KeyEvent
e
的结果来处理密钥绑定。protected boolean
JMenuBar. processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
子类检查所有的子菜单。protected boolean
JTable. processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
void
ComponentInputMap. put(KeyStroke keyStroke, Object actionMapKey)
添加一个绑定keyStroke
到actionMapKey
。void
InputMap. put(KeyStroke keyStroke, Object actionMapKey)
为keyStroke
添加一个绑定到actionMapKey
。void
JComponent. registerKeyboardAction(ActionListener anAction, String aCommand, KeyStroke aKeyStroke, int aCondition)
此方法现已过时,请使用getActionMap()
和getInputMap()
的组合进行类似的操作。void
JComponent. registerKeyboardAction(ActionListener anAction, KeyStroke aKeyStroke, int aCondition)
此方法现已过时,请使用getActionMap()
和getInputMap()
的组合进行类似的操作。void
ComponentInputMap. remove(KeyStroke key)
从此对象中删除key
的绑定。void
InputMap. remove(KeyStroke key)
从InputMap
删除key
的绑定。void
JMenu. setAccelerator(KeyStroke keyStroke)
setAccelerator
没有为JMenu
定义。void
JMenuItem. setAccelerator(KeyStroke keyStroke)
设置在不导航菜单层次结构的情况下调用菜单项的动作侦听器的组合键。void
JComponent. unregisterKeyboardAction(KeyStroke aKeyStroke)
这种方法现在已经过时了。 -
Uses of KeyStroke in javax.swing.plaf.basic
Fields in javax.swing.plaf.basic declared as KeyStroke Modifier and Type Field 描述 protected KeyStroke
BasicDesktopPaneUI. closeKey
已过时。截至1.3。protected KeyStroke
BasicSplitPaneUI. dividerResizeToggleKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicSplitPaneUI. downKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicTabbedPaneUI. downKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicToolBarUI. downKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicSplitPaneUI. endKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicSplitPaneUI. homeKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicSplitPaneUI. leftKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicTabbedPaneUI. leftKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicToolBarUI. leftKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicDesktopPaneUI. maximizeKey
已过时。截至1.3。protected KeyStroke
BasicDesktopPaneUI. minimizeKey
已过时。截至1.3。protected KeyStroke
BasicDesktopPaneUI. navigateKey
已过时。截至1.3。protected KeyStroke
BasicDesktopPaneUI. navigateKey2
已过时。截至1.3。protected KeyStroke
BasicInternalFrameUI. openMenuKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicSplitPaneUI. rightKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicTabbedPaneUI. rightKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicToolBarUI. rightKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicSplitPaneUI. upKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicTabbedPaneUI. upKey
已过时。从Java 2平台v1.3开始。protected KeyStroke
BasicToolBarUI. upKey
已过时。从Java 2平台v1.3开始。 -
Uses of KeyStroke in javax.swing.text
Fields in javax.swing.text declared as KeyStroke Modifier and Type Field 描述 KeyStroke
JTextComponent.KeyBinding. key
钥匙。Methods in javax.swing.text that return KeyStroke Modifier and Type 方法 描述 KeyStroke[]
Keymap. getBoundKeyStrokes()
获取此映射中所有与某些操作绑定的按键。KeyStroke[]
Keymap. getKeyStrokesForAction(Action a)
获取将导致给定操作的按键。Methods in javax.swing.text with parameters of type KeyStroke Modifier and Type 方法 描述 void
Keymap. addActionForKeyStroke(KeyStroke key, Action a)
添加绑定到键盘映射。Action
Keymap. getAction(KeyStroke key)
获取适合于给定符号事件序列的动作。boolean
Keymap. isLocallyDefined(KeyStroke key)
确定给定的键序列是否在本地定义。void
Keymap. removeKeyStrokeBinding(KeyStroke keys)
从键盘图中移除一个绑定。Constructors in javax.swing.text with parameters of type KeyStroke Constructor 描述 KeyBinding(KeyStroke key, String actionName)
创建一个新的键绑定。
-