Example usage for com.google.gwt.event.dom.client KeyUpEvent KeyUpEvent

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

Introduction

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

Prototype

protected KeyUpEvent() 

Source Link

Document

Protected constructor, use DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent,com.google.gwt.event.shared.HasHandlers) to fire key up events.

Usage

From source file:gwt.material.design.addins.client.richeditor.MaterialRichEditor.java

License:Apache License

@Override
public void load() {

    JsRichEditor jsRichEditor = $(getElement());

    options.toolbar = manager.getToolbars();
    options.placeholder = getPlaceholder();
    options.height = getHeight();/*from   www  .  java 2 s.  c  o m*/

    jsRichEditor.materialnote(options);

    // Events
    jsRichEditor.on(RichEditorEvents.MATERIALNOTE_BLUR, event -> {
        fireEvent(new BlurEvent() {
        });
        return true;
    });
    jsRichEditor.on(RichEditorEvents.MATERIALNOTE_FOCUS, event -> {
        fireEvent(new FocusEvent() {
        });
        return true;
    });
    jsRichEditor.on(RichEditorEvents.MATERIALNOTE_KEYUP, event -> {
        fireEvent(new KeyUpEvent() {
        });
        return true;
    });
    jsRichEditor.on(RichEditorEvents.MATERIALNOTE_KEYDOWN, event -> {
        fireEvent(new KeyDownEvent() {
        });
        return true;
    });
    jsRichEditor.on(RichEditorEvents.MATERIALNOTE_PASTE, event -> {
        fireEvent(new PasteEvent() {
        });
        return true;
    });
    jsRichEditor.on(RichEditorEvents.MATERIALNOTE_CHANGE, event -> {
        ValueChangeEvent.fire(MaterialRichEditor.this, getHTMLCode(getElement()));
        return true;
    });

    checkContainer();
}