Class BeforeSelectionEvent<T>

  • Type Parameters:
    T - the type about to be selected

    public class BeforeSelectionEvent<T>
    extends GwtEvent<BeforeSelectionHandler<T>>
    Represents a before selection event.
    • Constructor Detail

      • BeforeSelectionEvent

        protected BeforeSelectionEvent()
        Creates a new before selection event.
    • Method Detail

      • fire

        public static <T> 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.
        Type Parameters:
        T - 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
      • cancel

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

        public T getItem()
        Gets the item.
        Returns:
        the item
      • isCanceled

        public boolean isCanceled()
        Has the selection event already been canceled?
        Returns:
        is canceled
      • setItem

        protected final void setItem​(T item)
        Sets the item.
        Parameters:
        item - the item