Package docking.widgets.table.threaded
Class ThreadedTableColumnComparator<T>
- java.lang.Object
-
- docking.widgets.table.sort.RowToColumnComparator<T>
-
- docking.widgets.table.threaded.ThreadedTableColumnComparator<T>
-
- Type Parameters:
T
- the row type
- All Implemented Interfaces:
java.util.Comparator<T>
public class ThreadedTableColumnComparator<T> extends RowToColumnComparator<T>
A comparator for comparing table column values for threaded table models. This comparator uses the column cache of theThreadedTableModel
.
-
-
Field Summary
-
Fields inherited from class docking.widgets.table.sort.RowToColumnComparator
backupRowComparator, columnComparator, model, sortColumn
-
-
Constructor Summary
Constructors Constructor Description ThreadedTableColumnComparator(ThreadedTableModel<T,?> model, int sortColumn, java.util.Comparator<java.lang.Object> comparator)
Constructs this class with the given column comparator that will get called after the given row is converted to the column value for the given sort columnThreadedTableColumnComparator(ThreadedTableModel<T,?> model, int sortColumn, java.util.Comparator<java.lang.Object> comparator, java.util.Comparator<T> backupRowComparator)
This version of the constructor is used for the default case where the client will supply a backup row comparator that will get called if the given column comparator returns a '0' value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
getColumnValue(T t)
-
Methods inherited from class docking.widgets.table.sort.RowToColumnComparator
compare
-
-
-
-
Constructor Detail
-
ThreadedTableColumnComparator
public ThreadedTableColumnComparator(ThreadedTableModel<T,?> model, int sortColumn, java.util.Comparator<java.lang.Object> comparator)
Constructs this class with the given column comparator that will get called after the given row is converted to the column value for the given sort column- Parameters:
model
- the table model using this comparatorsortColumn
- the column being sortedcomparator
- the column comparator to use for sorting- See Also:
RowToColumnComparator
-
ThreadedTableColumnComparator
public ThreadedTableColumnComparator(ThreadedTableModel<T,?> model, int sortColumn, java.util.Comparator<java.lang.Object> comparator, java.util.Comparator<T> backupRowComparator)
This version of the constructor is used for the default case where the client will supply a backup row comparator that will get called if the given column comparator returns a '0' value.- Parameters:
model
- the table model using this comparatorsortColumn
- the column being sortedcomparator
- the column comparator to use for sortingbackupRowComparator
- the backup row comparator- See Also:
RowToColumnComparator
-
-
Method Detail
-
getColumnValue
protected java.lang.Object getColumnValue(T t)
- Overrides:
getColumnValue
in classRowToColumnComparator<T>
-
-