com.google.gwt.user.client.ui
Class KeyboardListenerAdapter

java.lang.Object
  extended bycom.google.gwt.user.client.ui.KeyboardListenerAdapter
All Implemented Interfaces:
EventListener, KeyboardListener

public class KeyboardListenerAdapter
extends Object
implements KeyboardListener

An adapter to simplify keyboard event listeners that do not need all events defined on the KeyboardListener interface.


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Fields inherited from interface com.google.gwt.user.client.ui.KeyboardListener
KEY_ALT, KEY_BACKSPACE, KEY_CTRL, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ENTER, KEY_ESCAPE, KEY_HOME, KEY_LEFT, KEY_PAGEDOWN, KEY_PAGEUP, KEY_RIGHT, KEY_SHIFT, KEY_TAB, KEY_UP, MODIFIER_ALT, MODIFIER_CTRL, MODIFIER_SHIFT
 
Constructor Summary
KeyboardListenerAdapter()
           
 
Method Summary
 void onKeyDown(Widget sender, char keyCode, int modifiers)
          Fired when the user depresses a physical key.
 void onKeyPress(Widget sender, char keyCode, int modifiers)
          Fired when a keyboard action generates a character.
 void onKeyUp(Widget sender, char keyCode, int modifiers)
          Fired when the user releases a physical key.
 
Methods inherited from class java.lang.Object
equals, finalize, hashCode, toString
 

Constructor Detail

KeyboardListenerAdapter

public KeyboardListenerAdapter()
Method Detail

onKeyDown

public void onKeyDown(Widget sender,
                      char keyCode,
                      int modifiers)
Description copied from interface: KeyboardListener
Fired when the user depresses a physical key.

Specified by:
onKeyDown in interface KeyboardListener
Parameters:
sender - the widget that was focused when the event occurred.
keyCode - the physical key that was depressed. Constants for this value are defined in this interface with the KEYCODE prefix.
modifiers - the modifier keys pressed at when the event occurred. This value is a combination of the bits defined by KeyboardListener.MODIFIER_SHIFT, KeyboardListener.MODIFIER_CTRL, and KeyboardListener.MODIFIER_ALT.

onKeyPress

public void onKeyPress(Widget sender,
                       char keyCode,
                       int modifiers)
Description copied from interface: KeyboardListener
Fired when a keyboard action generates a character. This occurs after onKeyDown and onKeyUp are fired for the physical key that was pressed.

Specified by:
onKeyPress in interface KeyboardListener
Parameters:
sender - the widget that was focused when the event occurred.
keyCode - the Unicode character that was generated by the keyboard action.
modifiers - the modifier keys pressed at when the event occurred. This value is a combination of the bits defined by KeyboardListener.MODIFIER_SHIFT, KeyboardListener.MODIFIER_CTRL, and KeyboardListener.MODIFIER_ALT.

onKeyUp

public void onKeyUp(Widget sender,
                    char keyCode,
                    int modifiers)
Description copied from interface: KeyboardListener
Fired when the user releases a physical key.

Specified by:
onKeyUp in interface KeyboardListener
Parameters:
sender - the widget that was focused when the event occurred.
keyCode - the physical key that was released. Constants for this value are defined in this interface with the KEYCODE prefix.
modifiers - the modifier keys pressed at when the event occurred. This value is a combination of the bits defined by KeyboardListener.MODIFIER_SHIFT, KeyboardListener.MODIFIER_CTRL, and KeyboardListener.MODIFIER_ALT.


This javadoc distribution was not produced by Google. The official documentation is here.