public class

BeforeSelectionEvent

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.BeforeSelectionEvent<T>

Class Overview

Represents a before selection event.

Summary

Protected Constructors
BeforeSelectionEvent()
Creates a new before selection event.
Public Methods
void cancel()
Cancel the before selection event.
static <T> BeforeSelectionEvent<T> fire(HasBeforeSelectionHandlers<T> source, T item)
Fires a before selection event on all registered handlers in the handler manager.
final Type<BeforeSelectionHandler<T>> getAssociatedType()
Returns the type used to register this event.
T getItem()
Gets the item.
static Type<BeforeSelectionHandler<?>> getType()
Gets the type associated with this event.
boolean isCanceled()
Has the selection event already been canceled?
Protected Methods
void dispatch(BeforeSelectionHandler<T> handler)
Should only be called by HandlerManager.
final void setItem(T item)
Sets the item.
[Expand]
Inherited Methods
From class com.google.gwt.event.shared.GwtEvent
From class java.lang.Object

Protected Constructors

protected BeforeSelectionEvent ()

Creates a new before selection event.

Public Methods

public void cancel ()

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

public static BeforeSelectionEvent<T> fire (HasBeforeSelectionHandlers<T> source, T item)

Fires a before 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
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

public final Type<BeforeSelectionHandler<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 getItem ()

Gets the item.

Returns
  • the item

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

Gets the type associated with this event.

Returns
  • returns the handler type

public boolean isCanceled ()

Has the selection event already been canceled?

Returns
  • is canceled

Protected Methods

protected void dispatch (BeforeSelectionHandler<T> handler)

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

Parameters
handler handler

protected final void setItem (T item)

Sets the item.

Parameters
item the item