|  
      JavaTM Platform Standard Ed. 6  |  
    |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.InputMap
javax.swing.ComponentInputMap
public class ComponentInputMap
      ComponentInputMap 是与特定 JComponent 相关联的 InputMap。只要 ComponentInputMap 发生更改,该组件都将自动获得通知。ComponentInputMap 用于 WHEN_IN_FOCUSED_WINDOW 绑定。 
| 构造方法摘要 | |
|---|---|
ComponentInputMap(JComponent component) 创建一个与给定组件相关联的 ComponentInputMap。 |  
    |
| 方法摘要 | |
|---|---|
  void |  
     clear() 从此对象中移除所有映射关系。  |  
    
  JComponent |  
     getComponent() 返回为其创建 InputMap 的组件。 |  
    
  void |  
     put(KeyStroke keyStroke, Object actionMapKey) 将一个 keyStroke 的绑定添加到 actionMapKey。 |  
    
  void |  
     remove(KeyStroke key) 从此对象中移除 key 的绑定。 |  
    
  void |  
     setParent(InputMap map) 设置父组件,该组件必须是一个和与此 ComponentInputMap 相同的组件相关联的 ComponentInputMap。 |  
    
| 从类 javax.swing.InputMap 继承的方法 | 
|---|
allKeys, get, getParent, keys, size |  
    
| 从类 java.lang.Object 继承的方法 | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |  
    
| 构造方法详细信息 | 
|---|
public ComponentInputMap(JComponent component)
ComponentInputMap。 
    
component - 一个非 null 
      JComponent 
     IllegalArgumentException - 如果 
      component 为 null
     | 方法详细信息 | 
|---|
public void setParent(InputMap map)
ComponentInputMap 相同的组件相关联的 
    ComponentInputMap。 
    
InputMap 中的 
      setParent
     map - 一个 
      ComponentInputMap 
     IllegalArgumentException - 如果 
      map 不是一个 
      ComponentInputMap 或者与相同的组件无关
     public JComponent getComponent()
InputMap 的组件。 
    
public void put(KeyStroke keyStroke,
                Object actionMapKey) 
  keyStroke 的绑定添加到 
    actionMapKey。如果 
    actionMapKey 为 null,则移除 
    keyStroke 的当前绑定。 
    
InputMap 中的 
      put
     public void remove(KeyStroke key)
key 的绑定。 
    
InputMap 中的 
      remove
     public void clear()
InputMap 中的 
      clear
      
        
      
  |  
      JavaTM Platform Standard Ed. 6  |  
    |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。