Example usage for com.google.gwt.event.dom.client FocusHandler onFocus

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

Introduction

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

Prototype

void onFocus(FocusEvent event);

Source Link

Document

Called when FocusEvent is fired.

Usage

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

License:Apache License

@Override
public HandlerRegistration addFocusHandler(FocusHandler handler) {
    return itemBox.addHandler(focusEvent -> {
        if (isEnabled()) {
            handler.onFocus(focusEvent);
        }//from www .  j  ava 2 s  . c o m
    }, FocusEvent.getType());
}

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

License:Apache License

@Override
public HandlerRegistration addFocusHandler(FocusHandler handler) {
    return addDomHandler(event -> {
        if (isEnabled())
            handler.onFocus(event);
    }, FocusEvent.getType());/*w w w.  jav a 2 s.co  m*/
}

From source file:org.jbpm.form.builder.ng.model.common.handler.EventHelper.java

License:Apache License

protected static void onFocusEvent(final Widget widget, Event event) {
    FocusEvent fevent = new FocusEvent() {
        @Override/*  w  ww.j  a va2  s .  c  o m*/
        public Object getSource() {
            return widget;
        }
    };
    fevent.setNativeEvent(event);
    List<FocusHandler> handlers = FOCUS_HANDLERS.get(widget);
    if (handlers != null) {
        for (FocusHandler handler : handlers) {
            handler.onFocus(fevent);
        }
    }
}