java.lang.Object
javax.swing.InputMap
javax.swing.ComponentInputMap
- 所有已实现的接口:
-
Serializable
- 直接已知的子类:
-
ComponentInputMapUIResource
ComponentInputMap 是与特定 JComponent 关联的 InputMap。每当 ComponentInputMap 更改时,组件会自动收到通知。 ComponentInputMap 用于 WHEN_IN_FOCUSED_WINDOW 绑定。
- 自 JDK 版本:
- 1.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()从此对象中删除所有映射。返回创建InputMap的组件。void为keyStroke添加到actionMapKey的绑定。void从此对象中删除key的绑定。void设置父级,必须是与此ComponentInputMap关联的相同组件的ComponentInputMap。
-
Constructor Details
-
ComponentInputMap
创建与指定组件关联的ComponentInputMap。- 参数:
-
component- 非空的JComponent - 抛出:
-
IllegalArgumentException- 如果component为 null
-
-
Method Details
-
setParent
设置父级,必须是与此ComponentInputMap关联的相同组件的ComponentInputMap。- 覆盖:
-
setParent在类InputMap - 参数:
-
map- 一个ComponentInputMap - 抛出:
-
IllegalArgumentException- 如果map不是ComponentInputMap或者与相同组件关联
-
getComponent
返回创建InputMap的组件。- 返回:
-
创建
InputMap的组件。
-
put
为keyStroke添加到actionMapKey的绑定。如果actionMapKey为 null,则删除keyStroke的当前绑定。 -
remove
从此对象中删除key的绑定。 -
clear
public void clear()从此对象中删除所有映射。
-