com.google.gwt.event.logical.shared

## Class SelectionEvent<T>

- java.lang.Object
- - com.google.web.bindery.event.shared.Event<H>
  - - com.google.gwt.event.shared.GwtEvent<SelectionHandler<T>>
    - - com.google.gwt.event.logical.shared.SelectionEvent<T>

Type Parameters:
  `T` - the type being selected

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

Represents a selection event.

### Nested Class Summary

### Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent

`GwtEvent.Type<H>`

### Constructor Summary

Constructors
`protected` `SelectionEvent(T selectedItem)` Creates a new selection event.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`protected void` `dispatch(SelectionHandler<T> handler)` Should only be called by `HandlerManager`.
`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.
`GwtEvent.Type<SelectionHandler<T>>` `getAssociatedType()` Returns the `Event.Type` used to register this event, allowing an `EventBus` to find handlers of the appropriate class.
`T` `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`

### Methods inherited from class com.google.web.bindery.event.shared.Event

`setSource, toDebugString, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SelectionEvent

    protected SelectionEvent(T selectedItem)

Creates a new selection event.

Parameters:
  `selectedItem` - selected item

### Method Detail

#### fire

    public 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.

Type Parameters:
  `T` - 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<T>> getAssociatedType()

Description copied from class: `Event`
Returns the `Event.Type` used to register this event, allowing an `EventBus` to find handlers of the appropriate class.

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

#### getSelectedItem

    public T getSelectedItem()

Gets the selected item.

Returns:
  the selected item

#### dispatch

    protected void dispatch(SelectionHandler<T> 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<T>>`
Parameters:
  `handler` - handler
See Also:
  `EventBus.dispatchEvent(Event, Object)`