Class DefaultSortController<M>

  • All Implemented Interfaces:
    SortController<M>
    Direct Known Subclasses:
    ListSortController, TableSortController

    public abstract class DefaultSortController<M>
    extends DefaultRowSorter<M,​Integer>
    implements SortController<M>
    A default SortController implementation used as parent class for concrete SortControllers in SwingX.

    Additionally, this implementation contains a fix for core Issue 6894632. It guarantees to only touch the underlying model during sort/filter and during processing the notification methods. This implies that the conversion and size query methods are valid at all times outside the internal updates, including the critical period (in core with undefined behaviour) after the underlying model has changed and before this sorter has been notified.

    Author:
    Jeanette Winzenburg
    • Field Detail

      • COMPARABLE_COMPARATOR

        public static final Comparator COMPARABLE_COMPARATOR
        Comparator that uses compareTo on the contents.
      • cachedModelRowCount

        protected int cachedModelRowCount
    • Constructor Detail

      • DefaultSortController

        public DefaultSortController()