org.netbeans.jemmy
Class DefaultCharBindingMap

java.lang.Object
  extended by org.netbeans.jemmy.DefaultCharBindingMap
All Implemented Interfaces:
CharBindingMap

public class DefaultCharBindingMap
extends Object
implements CharBindingMap

Default implementation of CharBindingMap interface. Provides a mapping for the following symbols:

Author:
Alexandre Iline (alexandre.iline@sun.com)
See Also:
CharBindingMap

Constructor Summary
DefaultCharBindingMap()
          Constructor.
 
Method Summary
 void addChar(char c, int key, int modifiers)
          Adds a char to supported.
 int getCharKey(char c)
          Returns the code of the primary key used to type a symbol.
 int getCharModifiers(char c)
          Returns the modifiers that should be pressed to type a symbol.
 int[] getKeyAndModifiers(char c)
          Returns key + modifiers pair.
 char[] getSupportedChars()
          Returns an array of all supported chars.
 void removeChar(char c)
          Removes a char from supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCharBindingMap

public DefaultCharBindingMap()
Constructor.

Method Detail

getCharKey

public int getCharKey(char c)
Returns the code of the primary key used to type a symbol.

Specified by:
getCharKey in interface CharBindingMap
Parameters:
c - Symbol code.
Returns:
a key code.
See Also:
CharBindingMap.getCharKey(char), InputEvent

getCharModifiers

public int getCharModifiers(char c)
Returns the modifiers that should be pressed to type a symbol.

Specified by:
getCharModifiers in interface CharBindingMap
Parameters:
c - Symbol code.
Returns:
a combination of InputEvent MASK fields.
See Also:
CharBindingMap.getCharModifiers(char), InputEvent

getKeyAndModifiers

public int[] getKeyAndModifiers(char c)
Returns key + modifiers pair.

Parameters:
c - Symbol code.
Returns:
an array of two elements: key code and modifiers mask - a combination of InputEvent MASK fields.

getSupportedChars

public char[] getSupportedChars()
Returns an array of all supported chars.

Returns:
an array of chars representing the supported chars values.

removeChar

public void removeChar(char c)
Removes a char from supported.

Parameters:
c - Symbol code.

addChar

public void addChar(char c,
                    int key,
                    int modifiers)
Adds a char to supported.

Parameters:
c - Symbol code.
key - key code.
modifiers - a combination of InputEvent MASK fields.