JavaTM 2 Platform
Standard Ed. 6

類別 javax.swing.InputMap
的使用

使用 InputMap 的軟體套件
javax.swing 提供一組“輕量級”(全部是 Java 語言)元件,盡量讓這些元件在所有平臺上的工作方式都相同。 
javax.swing.plaf 提供一個介面和許多抽象類別,Swing 用它們來提供自己的可插入外觀功能。 
 

javax.swing 中 InputMap 的使用
 

javax.swing 中 InputMap 的子類別
 class ComponentInputMap
          ComponentInputMap 是與特定 JComponent 相關聯的 InputMap。
 

返回 InputMap 的 javax.swing 中的方法
 InputMap JComponent.getInputMap()
          返回元件具有焦點時所使用的 InputMap。
 InputMap JComponent.getInputMap(int condition)
          返回 condition 中所使用的 InputMap。
 InputMap InputMap.getParent()
          獲得此 InputMap 的父級。
static InputMap SwingUtilities.getUIInputMap(JComponent component, int condition)
          返回由元件 component 中的條件 condition 的 UI 提供的 InputMap。
static InputMap LookAndFeel.makeInputMap(Object[] keys)
          根據 keys 創建一個 InputMapUIResource。
 

參數型別為 InputMap 的 javax.swing 中的方法
static void LookAndFeel.loadKeyBindings(InputMap retMap, Object[] keys)
          使用指定綁定填充 InputMap。
static void SwingUtilities.replaceUIInputMap(JComponent component, int type, InputMap uiInputMap)
          將 component 的 UI InputMap 更改為 uiInputMap 的便捷方法。
 void JComponent.setInputMap(int condition, InputMap map)
          設置在 map 的 condition 條件下要使用的 InputMap。
 void ComponentInputMap.setParent(InputMap map)
          設置父元件,該元件必須是一個和與此 ComponentInputMap 相同的元件相關聯的 ComponentInputMap。
 void InputMap.setParent(InputMap map)
          設置此 InputMap 的父級。
 

javax.swing.plaf 中 InputMap 的使用
 

javax.swing.plaf 中 InputMap 的子類別
 class ComponentInputMapUIResource
          實作 UIResource 的 javax.swing.ComponentInputMap 的子類別。
 class InputMapUIResource
          實作 UIResource 的 javax.swing.InputMap 的子類別。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

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