Interface FilteredTableSortModel<R,​C>

  • Type Parameters:
    R - the type representing a row in the table model
    C - the type representing the column identifiers in the table model

    public interface FilteredTableSortModel<R,​C>
    Handles the column sorting states for a FilteredTableModel.
    • Method Detail

      • sort

        void sort​(List<R> items)
        Sorts the given list according to the sort configuration
        Parameters:
        items - the items to sort
      • setSortOrder

        void setSortOrder​(C columnIdentifier,
                          SortOrder sortOrder)
        Clears the sorting state and adds the given column sorting order.
        Parameters:
        columnIdentifier - the identifier of the column to sort by
        sortOrder - the sorting order
        See Also:
        addSortOrder(Object, SortOrder), sortingState(Object)
      • isSortingEnabled

        boolean isSortingEnabled()
        Returns:
        true if sorting is enabled for one or more columns
      • columnSortOrder

        LinkedHashMap<C,​SortOrder> columnSortOrder()
        Returns the current column sort order, in order of priority
        Returns:
        the current column sort orderk, in order of priority
      • clear

        void clear()
        Clears the sorting states from this sort model. Note that only one sorting change event will happen, with the first sort column.
      • addSortingChangedListener

        void addSortingChangedListener​(EventDataListener<C> listener)
        Parameters:
        listener - a listener notified each time the sorting state changes, with the column identifier as event data