com.vaadin.client.widget.grid.events.

Class ColumnReorderEvent<T>

  • java.lang.Object
    • com.google.web.bindery.event.shared.Event<H>
      • com.google.gwt.event.shared.GwtEvent<ColumnReorderHandler<T>>
        • com.vaadin.client.widget.grid.events.ColumnReorderEvent<T>
  • Type Parameters:

    T - The row type of the grid. The row type is the POJO type from where the data is retrieved into the column cells.

    public class ColumnReorderEvent<T>
    extends com.google.gwt.event.shared.GwtEvent<ColumnReorderHandler<T>>

    An event for notifying that the columns in the Grid have been reordered.

    Since:

    7.5.0

    Author:

    Vaadin Ltd

    • Constructor Detail

      • ColumnReorderEvent

        public ColumnReorderEvent​(List<Grid.Column<?,​T>> oldColumnOrder,
                                  List<Grid.Column<?,​T>> newColumnOrder,
                                  boolean userOriginated)

        Constructs a reorder event for grid columns.

        Parameters:

        oldColumnOrder - the old order

        newColumnOrder - the new order

        userOriginated - true if the event was triggered by user interaction, false otherwise

    • Method Detail

      • getType

        public static final com.google.gwt.event.shared.GwtEvent.Type<ColumnReorderHandler<?>> getType()

        Returns the associated handler type.

        Returns:

        the handler type

      • getOldColumnOrder

        public List<Grid.Column<?,​T>> getOldColumnOrder()

        Gets the ordering of columns prior to this event.

        Returns:

        the list of columns in the grid's order prior to this event

      • getNewColumnOrder

        public List<Grid.Column<?,​T>> getNewColumnOrder()

        Gets the new ordering of columns.

        Returns:

        the list of columns in the grid's current order

      • isUserOriginated

        public boolean isUserOriginated()

        Check whether this event originated from the user reordering columns or via API call.

        Returns:

        true if columns were reordered by the user, false if not

      • getAssociatedType

        public com.google.gwt.event.shared.GwtEvent.Type<ColumnReorderHandler<T>> getAssociatedType()

        Specified by:

        getAssociatedType in class com.google.gwt.event.shared.GwtEvent<ColumnReorderHandler<T>>