Example usage for com.google.gwt.user.client.ui Widget sinkBitlessEvent

List of usage examples for com.google.gwt.user.client.ui Widget sinkBitlessEvent

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui Widget sinkBitlessEvent.

Prototype

public void sinkBitlessEvent(String eventTypeName) 

Source Link

Document

Sinks a named event.

Usage

From source file:gwt.material.design.client.ui.table.CellBasedWidgetImpl.java

License:Apache License

/**
 * Sink events on the widget./* w  w  w. j a v  a  2  s  .com*/
 *
 * @param widget the {@link Widget} that will handle the events
 * @param typeNames the names of the events to sink
 */
public final void sinkEvents(Widget widget, Set<String> typeNames) {
    if (typeNames == null) {
        return;
    }

    int eventsToSink = 0;
    for (String typeName : typeNames) {
        int typeInt = Event.getTypeInt(typeName);
        if (typeInt < 0) {
            widget.sinkBitlessEvent(typeName);
        } else {
            typeInt = sinkEvent(widget, typeName);
            if (typeInt > 0) {
                eventsToSink |= typeInt;
            }
        }
    }
    if (eventsToSink > 0) {
        widget.sinkEvents(eventsToSink);
    }
}

From source file:org.kaaproject.avro.ui.gwt.client.widget.grid.StringFilterHeaderBuilder.java

License:Apache License

public final void sinkEvents(Widget widget, Set<String> typeNames) {
    if (typeNames == null) {
        return;//from   w w w.  jav  a2 s  .  co  m
    }

    int eventsToSink = 0;
    for (String typeName : typeNames) {
        int typeInt = Event.getTypeInt(typeName);
        if (typeInt < 0) {
            widget.sinkBitlessEvent(typeName);
        } else {
            typeInt = sinkEvent(widget, typeName);
            if (typeInt > 0) {
                eventsToSink |= typeInt;
            }
        }
    }
    if (eventsToSink > 0) {
        widget.sinkEvents(eventsToSink);
    }
}