public class ComponentInputMap extends InputMap
ComponentInputMapは、特定のJComponentに関連付けられているInputMapです。 ComponentInputMapが変わると、コンポーネントが自動的に通知されます。 ComponentInputMapはWHEN_IN_FOCUSED_WINDOWバインディングに使用されます。 | コンストラクタ | 説明 | 
|---|---|
| ComponentInputMap(JComponent component) | 指定されたコンポーネントに関連付けられた ComponentInputMapを生成します。 | 
| 修飾子と型 | メソッド | 説明 | 
|---|---|---|
| void | clear() | このオブジェクトからすべてのマッピングを削除します。 | 
| JComponent | getComponent() | InputMapが生成されたコンポーネントを返します。 | 
| void | put(KeyStroke keyStroke, Object actionMapKey) | actionMapKeyにkeyStrokeのバインディングを追加します。 | 
| void | remove(KeyStroke key) | このオブジェクトから keyのバインドを削除します。 | 
| void | setParent(InputMap map) | 親を設定します。親は、この ComponentInputMapと同じコンポーネントに関連付けられたComponentInputMapである必要があります。 | 
public ComponentInputMap(JComponent component)
ComponentInputMapを生成します。component - null以外JComponentIllegalArgumentException - componentがnullである場合public void setParent(InputMap map)
ComponentInputMapと同じコンポーネントに関連付けられたComponentInputMapである必要があります。setParent、クラスInputMapmap - ComponentInputMapIllegalArgumentException - mapがComponentInputMapでない場合、または同じコンポーネントに関連付けられていない場合public JComponent getComponent()
InputMapが生成されたコンポーネントを返します。public void put(KeyStroke keyStroke, Object actionMapKey)
actionMapKeyにkeyStrokeのバインディングを追加します。 actionMapKeyがnullの場合、keyStrokeの現在のバインディングを削除します。  バグまたは機能を送信 
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。 
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved.  Use is subject to license terms.  Documentation Redistribution Policyも参照してください。