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

java.lang.Object
  extended by com.google.gwt.event.shared.GwtEvent<BeforeSelectionHandler<I>>
      extended by com.google.gwt.event.logical.shared.BeforeSelectionEvent<I>
Type Parameters:
I - the type about to be selected

public class BeforeSelectionEvent<I>
extends GwtEvent<BeforeSelectionHandler<I>>

Represents a before selection event.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
GwtEvent.Type<H>
 
Method Summary
 void cancel()
          Cancel the before selection event.
static
<I> BeforeSelectionEvent<I>
fire(HasBeforeSelectionHandlers<I> source, I item)
          Fires a before selection event on all registered handlers in the handler manager.
 GwtEvent.Type<BeforeSelectionHandler<I>> getAssociatedType()
          Returns the type used to register this event.
 I getItem()
          Gets the item.
static GwtEvent.Type<BeforeSelectionHandler<?>> getType()
          Gets the type associated with this event.
 boolean isCanceled()
          Has the selection event already been canceled?
 
Methods inherited from class com.google.gwt.event.shared.GwtEvent
getSource, toDebugString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

fire

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

Type Parameters:
I - the item type
Parameters:
source - the source of the handlers
item - the item
Returns:
the event so that the caller can check if it was canceled, or null if no handlers of this event type have been registered

getType

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

Returns:
returns the handler type

cancel

public void cancel()
Cancel the before selection event. Classes overriding this method should still call super.cancel().


getAssociatedType

public final GwtEvent.Type<BeforeSelectionHandler<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<BeforeSelectionHandler<I>>
Returns:
the type

getItem

public I getItem()
Gets the item.

Returns:
the item

isCanceled

public boolean isCanceled()
Has the selection event already been canceled?

Returns:
is canceled