Tabnine Logo
HasSelectionHandlers
Code IndexAdd Tabnine to your IDE (free)

How to use
HasSelectionHandlers
in
com.google.gwt.event.logical.shared

Best Java code snippets using com.google.gwt.event.logical.shared.HasSelectionHandlers (Showing top 10 results out of 315)

origin: kiegroup/appformer

protected void addSelectionHandler(HasSelectionHandlers<PartDefinition> widget) {
  widget.addSelectionHandler(new SelectionHandler<PartDefinition>() {
    @Override
    public void onSelection(final SelectionEvent<PartDefinition> event) {
      panelManager.onPartLostFocus();
      panelManager.onPartFocus(event.getSelectedItem());
    }
  });
}
origin: com.google.gwt/gwt-servlet

/**
 * Fires a selection event on all registered handlers in the handler
 * manager.If no such handlers exist, this method will do nothing.
 * 
 * @param <T> the selected item type
 * @param source the source of the handlers
 * @param selectedItem the selected item
 */
public static <T> void fire(HasSelectionHandlers<T> source, T selectedItem) {
 if (TYPE != null) {
  SelectionEvent<T> event = new SelectionEvent<T>(selectedItem);
  source.fireEvent(event);
 }
}
origin: de.esoco/gewt

  /***************************************
   * {@inheritDoc}
   */
  @Override
  @SuppressWarnings("unchecked")
  protected HandlerRegistration initEventDispatching(
    Widget    rWidget,
    EventType eEventType)
  {
    if (eEventType == EventType.SELECTION &&
      rWidget instanceof HasSelectionHandlers)
    {
      return ((HasSelectionHandlers<Integer>) rWidget)
          .addSelectionHandler(this);
    }
    return super.initEventDispatching(rWidget, eEventType);
  }
}
origin: net.wetheinter/gwt-user

/**
 * Fires a selection event on all registered handlers in the handler
 * manager.If no such handlers exist, this method will do nothing.
 * 
 * @param <T> the selected item type
 * @param source the source of the handlers
 * @param selectedItem the selected item
 */
public static <T> void fire(HasSelectionHandlers<T> source, T selectedItem) {
 if (TYPE != null) {
  SelectionEvent<T> event = new SelectionEvent<T>(selectedItem);
  source.fireEvent(event);
 }
}
origin: com.intendia.gwt.rxgwt/rxgwt

public static <T> Observable<SelectionEvent<T>> selection(HasSelectionHandlers<T> source) {
  return Observable.create(s -> register(s, source.addSelectionHandler(s::onNext)), uiBackpressureMode());
}
origin: com.vaadin.external.gwt/gwt-user

/**
 * Fires a selection event on all registered handlers in the handler
 * manager.If no such handlers exist, this method will do nothing.
 * 
 * @param <T> the selected item type
 * @param source the source of the handlers
 * @param selectedItem the selected item
 */
public static <T> void fire(HasSelectionHandlers<T> source, T selectedItem) {
 if (TYPE != null) {
  SelectionEvent<T> event = new SelectionEvent<T>(selectedItem);
  source.fireEvent(event);
 }
}
origin: intendia-oss/rxgwt

public static <T> Observable<SelectionEvent<T>> selection(HasSelectionHandlers<T> source) {
  return Observable.create(s -> register(s, source.addSelectionHandler(s::onNext)));
}
origin: de.esoco/gewt

.addSelectionHandler(this);
origin: GwtMaterialDesign/gwt-material

protected <H extends MaterialWidget & HasSelectionHandlers> void checkSelectionHandler(H widget, Object selectedItem) {
  // Check Open Event
  final boolean[] fired = {false};
  widget.addSelectionHandler(event -> {
    assertEquals(event.getSelectedItem(), selectedItem);
    fired[0] = true;
  });
  fireSelectionHandler(widget, selectedItem);
  assertTrue(fired[0]);
}
origin: com.github.gwtmaterialdesign/gwt-material

protected <H extends MaterialWidget & HasSelectionHandlers> void checkSelectionHandler(H widget, Object selectedItem) {
  // Check Open Event
  final boolean[] fired = {false};
  widget.addSelectionHandler(event -> {
    assertEquals(event.getSelectedItem(), selectedItem);
    fired[0] = true;
  });
  fireSelectionHandler(widget, selectedItem);
  assertTrue(fired[0]);
}
com.google.gwt.event.logical.sharedHasSelectionHandlers

Javadoc

A widget that implements this interface is a public source of SelectionEvent events.

Most used methods

  • addSelectionHandler
    Adds a SelectionEvent handler.
  • fireEvent

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now