Class SortEvent<T>


  • public class SortEvent<T>
    extends com.google.gwt.event.shared.GwtEvent<SortHandler<?>>
    A sort event, fired by the Grid when it needs its data source to provide data sorted in a specific manner.
    Since:
    7.4
    Author:
    Vaadin Ltd
    • Constructor Detail

      • SortEvent

        public SortEvent​(Grid<T> grid,
                         List<SortOrder> order,
                         boolean userOriginated)
        Creates a new Sort Event. All provided parameters are final, and passed on as-is.
        Parameters:
        grid - a grid reference
        order - an array dictating the desired sort order of the data source
        userOriginated - where this event originated from the user or not
    • Method Detail

      • getAssociatedType

        public com.google.gwt.event.shared.GwtEvent.Type<SortHandler<?>> getAssociatedType()
        Specified by:
        getAssociatedType in class com.google.gwt.event.shared.GwtEvent<SortHandler<?>>
      • getType

        public static com.google.gwt.event.shared.GwtEvent.Type<SortHandler<?>> getType()
        Static access to the GWT event type identifier associated with this Event class.
        Returns:
        a type object, uniquely describing this event type.
      • getSource

        public Grid<T> getSource()
        Get access to the Grid that fired this event.
        Overrides:
        getSource in class com.google.gwt.event.shared.GwtEvent<SortHandler<?>>
        Returns:
        the grid instance
      • getGrid

        public Grid<T> getGrid()
        Get access to the Grid that fired this event.
        Returns:
        the grid instance
      • getOrder

        public List<SortOrder> getOrder()
        Get the sort ordering that is to be applied to the Grid.
        Returns:
        a list of sort order objects
      • isUserOriginated

        public boolean isUserOriginated()
        Returns whether this event originated from actions done by the user.
        Returns:
        true if sort event originated from user interaction
      • dispatch

        protected void dispatch​(SortHandler<?> handler)
        Specified by:
        dispatch in class com.google.gwt.event.shared.GwtEvent<SortHandler<?>>