JavaTM 2 Platform
Standard Ed. 6

类 java.awt.AWTKeyStroke
的使用

使用 AWTKeyStroke 的软件包
java.awt 包含用于创建用户界面和绘制图形图像的所有类。 
javax.swing 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 
 

java.awtAWTKeyStroke 的使用
 

返回 AWTKeyStrokejava.awt 中的方法
static AWTKeyStroke AWTKeyStroke.getAWTKeyStroke(char keyChar)
          返回表示指定字符的 KEY_TYPED 事件的 AWTKeyStroke 的一个共享实例。
static AWTKeyStroke AWTKeyStroke.getAWTKeyStroke(Character keyChar, int modifiers)
          返回一个共享的 AWTKeyStroke 实例,它表示针对指定 Character 对象和一组组合键的 KEY_TYPED 事件。
static AWTKeyStroke AWTKeyStroke.getAWTKeyStroke(int keyCode, int modifiers)
          在给出一个数字键代码和一组修饰符的情况下,返回 AWTKeyStroke 的一个共享实例。
static AWTKeyStroke AWTKeyStroke.getAWTKeyStroke(int keyCode, int modifiers, boolean onKeyRelease)
          在给出一个数字键代码和一组修饰符的情况下,返回 AWTKeyStroke 的一个共享实例,指定该键在按下或释放时是否是被激活。
static AWTKeyStroke AWTKeyStroke.getAWTKeyStroke(String s)
          分析字符串并返回一个 AWTKeyStroke
static AWTKeyStroke AWTKeyStroke.getAWTKeyStrokeForEvent(KeyEvent anEvent)
          返回一个 AWTKeyStroke,它表示生成给定 KeyEvent 的键击事件。
 

返回变量类型为 AWTKeyStroke 的类型的 java.awt 中的方法
 Set<AWTKeyStroke> KeyboardFocusManager.getDefaultFocusTraversalKeys(int id)
          返回给定遍历操作的默认焦点遍历键的 Set。
 Set<AWTKeyStroke> Window.getFocusTraversalKeys(int id)
          获取此窗口的焦点遍历键。
 Set<AWTKeyStroke> Container.getFocusTraversalKeys(int id)
          为此 Container 的给定遍历操作返回焦点遍历键的 Set。
 Set<AWTKeyStroke> Component.getFocusTraversalKeys(int id)
          返回此 Component 的给定遍历操作的焦点遍历键 Set。
 

类型变量类型为 AWTKeyStrokejava.awt 中的方法参数
 void KeyboardFocusManager.setDefaultFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)
          设置给定遍历操作的默认焦点遍历键。
 void Container.setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)
          为此 Container 的给定遍历操作设置焦点遍历键。
 void Component.setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)
          为此 Component 的给定遍历操作设置焦点遍历键。
 

javax.swingAWTKeyStroke 的使用
 

javax.swingAWTKeyStroke 的子类
 class KeyStroke
          表示键盘或等效输入设置上的键操作的 KeyStroke。
 

类型变量类型为 AWTKeyStrokejavax.swing 中的方法参数
 void JComponent.setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)
          设置针对此 Component 的给定遍历操作的焦点遍历键。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only