de.tkuhn.swing.table
Interface ComparatorTableModel

All Superinterfaces:
javax.swing.table.TableModel

public interface ComparatorTableModel
extends javax.swing.table.TableModel

This adds a method to TableModel that may be used to retrieve Comparators which should be used to sort the values of columns.

Version:
0.9.3
Author:
Tilmann Kuhn
See Also:
TableModel, Comparator

Method Summary
 java.util.Comparator<?> getComparator(int columnIndex)
          Returns a Comparator that can be used to compare two Objects in this TableModels column columnIndex.
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Method Detail

getComparator

java.util.Comparator<?> getComparator(int columnIndex)
Returns a Comparator that can be used to compare two Objects in this TableModels column columnIndex.

Parameters:
columnIndex - the column number we need a Comparator for.
Returns:
the Comparator or null if there is no Comparator for this column.
See Also:
Comparator


Copyright © Tilmann Kuhn