Example usage for com.google.gwt.event.dom.client KeyUpHandler onKeyUp

List of usage examples for com.google.gwt.event.dom.client KeyUpHandler onKeyUp

Introduction

In this page you can find the example usage for com.google.gwt.event.dom.client KeyUpHandler onKeyUp.

Prototype

void onKeyUp(KeyUpEvent event);

Source Link

Document

Called when KeyUpEvent is fired.

Usage

From source file:com.threerings.gwt.util.InputClickCallback.java

License:Open Source License

@Override
protected ButtonBase createConfirmButton(String text, ClickHandler onClick) {
    final ButtonBase button = super.createConfirmButton(text, onClick);
    if (_bindEnterKey) {
        EnterClickAdapter.bind(_widget, onClick);
    }//from   w ww.ja  v a  2s  . c o m
    KeyUpHandler handler = new KeyUpHandler() {
        @Override
        public void onKeyUp(KeyUpEvent event) {
            String text = _widget.getText();
            button.setEnabled(text != null && text.length() > 0);
        }
    };
    _handlerReg = _widget.addKeyUpHandler(handler);
    handler.onKeyUp(null);
    return button;
}

From source file:gwt.material.design.addins.client.autocomplete.MaterialAutoComplete.java

License:Apache License

@Override
public HandlerRegistration addKeyUpHandler(final KeyUpHandler handler) {
    return itemBox.addKeyUpHandler(event -> {
        if (isEnabled()) {
            handler.onKeyUp(event);
        }//  ww w .  j  av a2s . c  o m
    });
}

From source file:gwt.material.design.components.client.base.widget.MaterialWidget.java

License:Apache License

@Override
public HandlerRegistration addKeyUpHandler(KeyUpHandler handler) {
    return addDomHandler(event -> {
        if (isEnabled())
            handler.onKeyUp(event);
    }, KeyUpEvent.getType());/*w  w w.j  ava2  s  . co  m*/
}

From source file:org.pentaho.gwt.widgets.client.text.ValidationTextBoxKeyUpHandlerCollection.java

License:Open Source License

/**
 * Fires a onKeyUp event to all handlers
 * //w ww. ja  v  a 2 s  .c  om
 * @param event
 *          the widget sending the event.
 */
public void fireOnKeyUp(KeyUpEvent event) {
    for (KeyUpHandler handler : this) {
        handler.onKeyUp(event);
    }
}