public class

SelectionEvent

extends GwtEvent<H extends EventHandler>
java.lang.Object
   ↳ com.google.gwt.event.shared.GwtEvent<H extends com.google.gwt.event.shared.EventHandler>
     ↳ com.google.gwt.event.logical.shared.SelectionEvent<T>

Class Overview

Represents a selection event.

Summary

Protected Constructors
SelectionEvent(T selectedItem)
Creates a new selection event.
Public Methods
static <T> void fire(HasSelectionHandlers<T> source, T selectedItem)
Fires a selection event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing.
final Type<SelectionHandler<T>> getAssociatedType()
Returns the type used to register this event.
T getSelectedItem()
Gets the selected item.
static Type<SelectionHandler<?>> getType()
Gets the type associated with this event.
Protected Methods
void dispatch(SelectionHandler<T> handler)
Should only be called by HandlerManager.
[Expand]
Inherited Methods
From class com.google.gwt.event.shared.GwtEvent
From class java.lang.Object

Protected Constructors

protected SelectionEvent (T selectedItem)

Creates a new selection event.

Parameters
selectedItem selected item

Public Methods

public static void fire (HasSelectionHandlers<T> source, T selectedItem)

Fires a selection event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing.

Parameters
source the source of the handlers
selectedItem the selected item

public final Type<SelectionHandler<T>> getAssociatedType ()

Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

Returns
  • the type

public T getSelectedItem ()

Gets the selected item.

Returns
  • the selected item

public static Type<SelectionHandler<?>> getType ()

Gets the type associated with this event.

Returns
  • returns the handler type

Protected Methods

protected void dispatch (SelectionHandler<T> handler)

Should only be called by HandlerManager. In other words, do not use or call.

Parameters
handler handler