Class TableSorter
java.lang.Object
javax.swing.table.AbstractTableModel
org.openscience.jmol.app.janocchio.TableSorter
- All Implemented Interfaces:
Serializable
,TableModel
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private class
private class
private class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private Map
static final Comparator
static final int
private static TableSorter.Directive
static final Comparator
private int[]
private MouseListener
static final int
private List
private JTableHeader
protected TableModel
private TableModelListener
private TableSorter.Row[]
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorsConstructorDescriptionTableSorter
(TableModel tableModel) TableSorter
(TableModel tableModel, JTableHeader tableHeader) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
getColumnClass
(int column) int
getColumnName
(int column) protected Comparator
getComparator
(int column) private TableSorter.Directive
getDirective
(int column) protected Icon
getHeaderRendererIcon
(int column, int size) private int[]
int
int
getSortingStatus
(int column) getValueAt
(int row, int column) private TableSorter.Row[]
boolean
isCellEditable
(int row, int column) boolean
int
modelIndex
(int viewIndex) void
setColumnComparator
(Class type, Comparator comparator) void
setSortingStatus
(int column, int status) void
setTableHeader
(JTableHeader tableHeader) void
setTableModel
(TableModel tableModel) void
setValueAt
(Object aValue, int row, int column) private void
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
tableModel
-
DESCENDING
public static final int DESCENDING- See Also:
-
NOT_SORTED
public static final int NOT_SORTED- See Also:
-
ASCENDING
public static final int ASCENDING- See Also:
-
EMPTY_DIRECTIVE
-
COMPARABLE_COMAPRATOR
-
LEXICAL_COMPARATOR
-
viewToModel
-
modelToView
private int[] modelToView -
tableHeader
-
mouseListener
-
tableModelListener
-
columnComparators
-
sortingColumns
-
-
Constructor Details
-
TableSorter
public TableSorter() -
TableSorter
-
TableSorter
-
-
Method Details
-
clearSortingState
private void clearSortingState() -
getTableModel
-
setTableModel
-
getTableHeader
-
setTableHeader
-
isSorting
public boolean isSorting() -
getDirective
-
getSortingStatus
public int getSortingStatus(int column) -
sortingStatusChanged
private void sortingStatusChanged() -
setSortingStatus
public void setSortingStatus(int column, int status) -
getHeaderRendererIcon
-
cancelSorting
private void cancelSorting() -
setColumnComparator
-
getComparator
-
getViewToModel
-
modelIndex
public int modelIndex(int viewIndex) -
getModelToView
private int[] getModelToView() -
getRowCount
public int getRowCount() -
getColumnCount
public int getColumnCount() -
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
getValueAt
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-