API Reference 0.3.24dart_web_toolkit_eventKeyPressHandlerAdapter

KeyPressHandlerAdapter class

Handler interface for {@link KeyPressEvent} events.

class KeyPressHandlerAdapter extends EventHandlerAdapter implements KeyPressHandler {

 KeyPressHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback);

 /**
  * Called when KeyPressEvent is fired.
  *
  * @param event the {@link KeyPressEvent} that was fired
  */
 void onKeyPress(KeyPressEvent event) {
   callback(event);
 }
}

Extends

EventHandlerAdapter > KeyPressHandlerAdapter

Implements

KeyPressHandler

Constructors

new KeyPressHandlerAdapter(EventHandlerAdapterCallback callback) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
KeyPressHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback);

Properties

EventHandlerAdapterCallback callback #

inherited from EventHandlerAdapter
EventHandlerAdapterCallback callback

Methods

void onKeyPress(KeyPressEvent event) #

Called when KeyPressEvent is fired.

@param event the {@link KeyPressEvent} that was fired

void onKeyPress(KeyPressEvent event) {
 callback(event);
}