モジュール java.desktop
パッケージ javax.swing

クラスComponentInputMap

java.lang.Object
javax.swing.InputMap
javax.swing.ComponentInputMap
すべての実装されたインタフェース:
Serializable
直系の既知のサブクラス:
ComponentInputMapUIResource

public class ComponentInputMap extends InputMap
ComponentInputMapは、特定のJComponentに関連付けられているInputMapです。 ComponentInputMapが変わると、コンポーネントが自動的に通知されます。 ComponentInputMapWHEN_IN_FOCUSED_WINDOWバインディングに使用されます。
導入されたバージョン:
1.3
  • コンストラクタのサマリー

    コンストラクタ
    コンストラクタ
    説明
    指定されたコンポーネントに関連付けられたComponentInputMapを生成します。
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    void
    このオブジェクトからすべてのマッピングを削除します。
    InputMapが生成されたコンポーネントを返します。
    void
    put(KeyStroke keyStroke, Object actionMapKey)
    actionMapKeykeyStrokeのバインディングを追加します。
    void
    このオブジェクトからkeyのバインドを削除します。
    void
    親を設定します。親は、このComponentInputMapと同じコンポーネントに関連付けられたComponentInputMapである必要があります。

    クラス javax.swing.InputMapで宣言されたメソッド

    allKeys, get, getParent, keys, size

    クラス java.lang.Objectで宣言されたメソッド

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • コンストラクタの詳細

    • ComponentInputMap

      public ComponentInputMap(JComponent component)
      指定されたコンポーネントに関連付けられたComponentInputMapを生成します。
      パラメータ:
      component - null以外JComponent
      例外:
      IllegalArgumentException - componentがnullである場合
  • メソッドの詳細

    • setParent

      public void setParent(InputMap map)
      親を設定します。親は、このComponentInputMapと同じコンポーネントに関連付けられたComponentInputMapである必要があります。
      オーバーライド:
      setParent、クラスInputMap
      パラメータ:
      map - ComponentInputMap
      例外:
      IllegalArgumentException - mapComponentInputMapでない場合、または同じコンポーネントに関連付けられていない場合
    • getComponent

      public JComponent getComponent()
      InputMapが生成されたコンポーネントを返します。
      戻り値:
      InputMapが作成されたコンポーネント。
    • put

      public void put(KeyStroke keyStroke, Object actionMapKey)
      actionMapKeykeyStrokeのバインディングを追加します。 actionMapKeyがnullの場合、keyStrokeの現在のバインディングを削除します。
      オーバーライド:
      put、クラスInputMap
      パラメータ:
      keyStroke - KeyStroke
      actionMapKey - アクション・マップ・キー
    • remove

      public void remove(KeyStroke key)
      このオブジェクトからkeyのバインドを削除します。
      オーバーライド:
      remove、クラスInputMap
      パラメータ:
      key - バインディングを削除するKeyStroke
    • clear

      public void clear()
      このオブジェクトからすべてのマッピングを削除します。
      オーバーライド:
      clear、クラスInputMap