GWT 2.0.3

com.google.gwt.event.logical.shared
Class SelectionEvent<I>

java.lang.Object
  extended by com.google.gwt.event.shared.GwtEvent<SelectionHandler<I>>
      extended by com.google.gwt.event.logical.shared.SelectionEvent<I>
Type Parameters:
I - the type being selected

public class SelectionEvent<I>
extends GwtEvent<SelectionHandler<I>>

Represents a selection event.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
GwtEvent.Type<H>
 
Constructor Summary
protected SelectionEvent(I selectedItem)
          Creates a new selection event.
 
Method Summary
protected  void dispatch(SelectionHandler<I> handler)
          Should only be called by HandlerManager.
static
<I> void
fire(HasSelectionHandlers<I> source, I selectedItem)
          Fires a selection event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing.
 GwtEvent.Type<SelectionHandler<I>> getAssociatedType()
          Returns the type used to register this event.
 I getSelectedItem()
          Gets the selected item.
static GwtEvent.Type<SelectionHandler<?>> getType()
          Gets the type associated with this event.
 
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, getSource, isLive, kill, revive, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectionEvent

protected SelectionEvent(I selectedItem)
Creates a new selection event.

Parameters:
selectedItem - selected item
Method Detail

fire

public static <I> void fire(HasSelectionHandlers<I> source,
                            I selectedItem)
Fires a selection event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing.

Type Parameters:
I - the selected item type
Parameters:
source - the source of the handlers
selectedItem - the selected item

getType

public static GwtEvent.Type<SelectionHandler<?>> getType()
Gets the type associated with this event.

Returns:
returns the handler type

getAssociatedType

public final GwtEvent.Type<SelectionHandler<I>> getAssociatedType()
Description copied from class: GwtEvent
Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

Specified by:
getAssociatedType in class GwtEvent<SelectionHandler<I>>
Returns:
the type

getSelectedItem

public I getSelectedItem()
Gets the selected item.

Returns:
the selected item

dispatch

protected void dispatch(SelectionHandler<I> handler)
Description copied from class: GwtEvent
Should only be called by HandlerManager. In other words, do not use or call.

Specified by:
dispatch in class GwtEvent<SelectionHandler<I>>
Parameters:
handler - handler

GWT 2.0.3