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
        items - the items to sort
      • setSortOrder

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

        boolean isSortingEnabled()
        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
        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)
        listener - a listener notified each time the sorting state changes, with the column identifier as event data