Uses of Class
javax.swing.KeyStroke
-
Packages that use KeyStroke 软件包 描述 javax.swing 提供一组“轻量级”(全Java语言)组件,这些组件在所有平台上尽可能地工作。javax.swing.plaf.basic 提供根据Basic外观构建的用户界面对象。javax.swing.text 提供处理可编辑和不可编辑文本组件的类和接口。 -
-
Uses of KeyStroke in javax.swing
Methods in javax.swing that return KeyStroke 变量和类型 方法 描述 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 变量和类型 方法 描述 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)
调用actionPerformed
上action
如果action
是非null
并接受发送对象。protected boolean
JComponent. processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
作为KeyEvent
e
的结果,调用以处理ks
的键绑定。protected boolean
JMenuBar. processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
Subclassed检查所有儿童菜单。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 变量和类型 字段 描述 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 变量和类型 字段 描述 KeyStroke
JTextComponent.KeyBinding. key
钥匙。Methods in javax.swing.text that return KeyStroke 变量和类型 方法 描述 KeyStroke[]
Keymap. getBoundKeyStrokes()
获取此映射中绑定到某个操作的所有击键。KeyStroke[]
Keymap. getKeyStrokesForAction(Action a)
获取将导致给定操作的击键。Methods in javax.swing.text with parameters of type KeyStroke 变量和类型 方法 描述 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 构造器 描述 KeyBinding(KeyStroke key, String actionName)
创建新的键绑定。
-