com.gwtext.client.util
Class KeyMapConfig

java.lang.Object
  extended by com.gwtext.client.core.JsObject
      extended by com.gwtext.client.core.BaseConfig
          extended by com.gwtext.client.util.KeyMapConfig

public class KeyMapConfig
extends BaseConfig

KeyMap configuration class.


Field Summary
 
Fields inherited from class com.gwtext.client.core.JsObject
jsObj
 
Constructor Summary
KeyMapConfig()
           
KeyMapConfig(int keyCode)
          The keycode to handle.
KeyMapConfig(int[] keyCodes)
          An array of keycodes to handle.
KeyMapConfig(java.lang.String keys)
          A list of keys to handle.
 
Method Summary
 void setAlt(boolean alt)
          True to handle key only when alt is pressed (defaults to false).
 void setCtrl(boolean ctrl)
          True to handle key only when ctrl is pressed (defaults to false).
 void setKey(int key)
          The keycode to handle.
 void setKey(int[] keyCodes)
          An array of keycodes to handle.
 void setKey(java.lang.String keys)
          A list of keys to handle.
 void setKeyListener(KeyListener listener)
          The listener to call when KeyMap finds the expected key combination.
 void setShift(boolean shift)
          True to handle key only when shift is pressed (defaults to false)
 
Methods inherited from class com.gwtext.client.core.JsObject
getJsObj, getProperties, isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyMapConfig

public KeyMapConfig()

KeyMapConfig

public KeyMapConfig(int keyCode)
The keycode to handle.

Parameters:
keyCode - the keycode

KeyMapConfig

public KeyMapConfig(int[] keyCodes)
An array of keycodes to handle.

Parameters:
keyCodes - keycodes

KeyMapConfig

public KeyMapConfig(java.lang.String keys)
A list of keys to handle.

Parameters:
keys - the keys to handles
Method Detail

setKey

public void setKey(int key)
The keycode to handle.

Parameters:
key - the keycode

setKey

public void setKey(java.lang.String keys)
A list of keys to handle.

Parameters:
keys - the keys to handles

setKey

public void setKey(int[] keyCodes)
An array of keycodes to handle.

Parameters:
keyCodes - keycodes

setCtrl

public void setCtrl(boolean ctrl)
True to handle key only when ctrl is pressed (defaults to false).

Parameters:
ctrl - true to handle ctrl

setAlt

public void setAlt(boolean alt)
True to handle key only when alt is pressed (defaults to false).

Parameters:
alt - true to handle alt

setShift

public void setShift(boolean shift)
True to handle key only when shift is pressed (defaults to false)

Parameters:
shift - true to handle shift

setKeyListener

public void setKeyListener(KeyListener listener)
The listener to call when KeyMap finds the expected key combination.

Parameters:
listener - the listener