Example usage for com.google.gwt.event.logical.shared SelectionHandler onSelection

List of usage examples for com.google.gwt.event.logical.shared SelectionHandler onSelection

Introduction

In this page you can find the example usage for com.google.gwt.event.logical.shared SelectionHandler onSelection.

Prototype

void onSelection(SelectionEvent<T> event);

Source Link

Document

Called when SelectionEvent is fired.

Usage

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

License:Apache License

@Override
public HandlerRegistration addSelectionHandler(final SelectionHandler<Suggestion> handler) {
    return addHandler(new SelectionHandler<Suggestion>() {
        @Override//from  ww w  .  j a va 2 s .com
        public void onSelection(SelectionEvent<Suggestion> event) {
            if (isEnabled()) {
                handler.onSelection(event);
            }
        }
    }, SelectionEvent.getType());
}

From source file:gwt.material.design.addins.client.stepper.MaterialStep.java

License:Apache License

@Override
public HandlerRegistration addSelectionHandler(final SelectionHandler<MaterialStep> handler) {
    return this.addHandler(new SelectionHandler<MaterialStep>() {
        @Override//ww w.j  ava2  s . c o  m
        public void onSelection(SelectionEvent<MaterialStep> event) {
            if (isEnabled()) {
                handler.onSelection(event);
            }
        }
    }, SelectionEvent.getType());
}

From source file:gwt.material.design.addins.client.tree.MaterialTree.java

License:Apache License

@Override
public HandlerRegistration addSelectionHandler(final SelectionHandler<MaterialTreeItem> handler) {
    return addHandler(new SelectionHandler<MaterialTreeItem>() {
        @Override//w ww  .j a  v  a  2 s .  c o  m
        public void onSelection(SelectionEvent<MaterialTreeItem> event) {
            if (isEnabled()) {
                handler.onSelection(event);
            }
        }
    }, SelectionEvent.getType());
}

From source file:org.bonitasoft.forms.client.view.widget.FormFieldWidget.java

License:Open Source License

/**
 * {@inheritDoc}/*ww  w.  j a  v  a2 s .  c  o m*/
 */
@Override
public void onSelection(final SelectionEvent<Suggestion> selectionEvent) {
    if (selectionHandlers != null) {
        for (final SelectionHandler<Suggestion> selectionHandler : selectionHandlers) {
            selectionHandler.onSelection(selectionEvent);
        }
    }
}

From source file:org.jbpm.formbuilder.client.effect.view.ValidationTablePanel.java

License:Apache License

@Override
@SuppressWarnings("unchecked")
public void fireEvent(GwtEvent<?> event) {
    for (SelectionHandler<FBValidationItem> handler : tableHandlers) {
        handler.onSelection((SelectionEvent<FBValidationItem>) event);
    }/*from   w ww  . j a v a 2s .  com*/
}

From source file:org.sonar.plugins.core.clouds.client.widget.TabWidget.java

License:Open Source License

public TabWidget(final SelectionHandler<Integer> selectionListener) {
    nbTab = 0;//  w  w  w .j  a va2  s.  c o  m
    initWidget(tab);
    tab.setWidth("100%");

    tab.addSelectionHandler(new SelectionHandler<Integer>() {
        public void onSelection(SelectionEvent<Integer> event) {
            selectedTabId = tab.getWidget(event.getSelectedItem()).getElement().getId().replace("_tab_content",
                    "");
            selectedIndex = event.getSelectedItem();
            selectionListener.onSelection(event);
        }
    });

}