public class

CellPreviewEvent

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.view.client.CellPreviewEvent<T>

Class Overview

Allows the previewing of events before they are fired to Cells.

Summary

Nested Classes
interface CellPreviewEvent.Handler<T> Handler for CellPreviewEvent
Protected Constructors
CellPreviewEvent(NativeEvent nativeEvent, HasData<T> display, Cell.Context context, T value, boolean isCellEditing, boolean isSelectionHandled)
Construct a new CellPreviewEvent.
Public Methods
static <T> CellPreviewEvent<T> fire(HasCellPreviewHandlers<T> source, NativeEvent nativeEvent, HasData<T> display, Cell.Context context, T value, boolean isCellEditing, boolean isSelectionHandled)
Fires a cell preview event on all registered handlers in the handler manager.
Type<Handler<T>> getAssociatedType()
Returns the type used to register this event.
int getColumn()
Get the column index of the Cell where the event occurred if the source is a table.
Cell.Context getContext()
Get the cell Cell.Context.
HasData<T> getDisplay()
Get the HasData source of the event.
int getIndex()
Get the index of the value where the event occurred.
NativeEvent getNativeEvent()
Get the NativeEvent to preview.
static Type<Handler<?>> getType()
Gets the type associated with this event.
T getValue()
Get the value where the event occurred.
boolean isCanceled()
Check if the event has been canceled.
boolean isCellEditing()
Check whether or not the cell where the event occurred is being edited.
boolean isSelectionHandled()
Check whether or not selection is being handled by the widget or one of its Cells.
void setCanceled(boolean cancel)
Cancel the event and prevent it from firing to the Cell.
Protected Methods
void dispatch(Handler<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 CellPreviewEvent (NativeEvent nativeEvent, HasData<T> display, Cell.Context context, T value, boolean isCellEditing, boolean isSelectionHandled)

Construct a new CellPreviewEvent.

Parameters
nativeEvent the event to preview
display the HasData source of the event
context the Cell Cell.Context
value the value where the event occurred
isCellEditing indicates whether or not the cell is being edited
isSelectionHandled indicates whether or not selection is handled

Public Methods

public static CellPreviewEvent<T> fire (HasCellPreviewHandlers<T> source, NativeEvent nativeEvent, HasData<T> display, Cell.Context context, T value, boolean isCellEditing, boolean isSelectionHandled)

Fires a cell preview event on all registered handlers in the handler manager. If no such handlers exist, this implementation will do nothing. This implementation sets the column to 0.

Parameters
source the source of the handlers
nativeEvent the event to preview
display the HasData source of the event
context the Cell Cell.Context
value the value where the event occurred
isCellEditing indicates whether or not the cell is being edited
isSelectionHandled indicates whether or not selection is handled
Returns

public Type<Handler<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 int getColumn ()

Get the column index of the Cell where the event occurred if the source is a table. If the source is not a table, the column is always 0.

Returns
  • the column index, or 0 if there is only one column

public Cell.Context getContext ()

Get the cell Cell.Context.

Returns

public HasData<T> getDisplay ()

Get the HasData source of the event.

public int getIndex ()

Get the index of the value where the event occurred.

public NativeEvent getNativeEvent ()

Get the NativeEvent to preview.

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

Gets the type associated with this event.

Returns
  • returns the handler type

public T getValue ()

Get the value where the event occurred.

public boolean isCanceled ()

Check if the event has been canceled.

Returns
  • true if the event has been canceled

public boolean isCellEditing ()

Check whether or not the cell where the event occurred is being edited.

Returns
  • true if the cell is being edited, false if not

public boolean isSelectionHandled ()

Check whether or not selection is being handled by the widget or one of its Cells.

Returns
  • true if selection is handled by the widget

public void setCanceled (boolean cancel)

Cancel the event and prevent it from firing to the Cell.

Parameters
cancel true to cancel the event, false to allow it

Protected Methods

protected void dispatch (Handler<T> handler)

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

Parameters
handler handler