net.mlw.vlh.swing.support
Class TableSorter
java.lang.Object
javax.swing.table.AbstractTableModel
net.mlw.vlh.swing.support.TableSorter
- All Implemented Interfaces:
- ActionListener, EventListener, Serializable, TableModel, ValueListTableModel
- public class TableSorter
- extends AbstractTableModel
- implements ValueListTableModel, ActionListener
- See Also:
- Serialized Form
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
valueListTableModel
protected ValueListTableModel valueListTableModel
tableModel
protected TableModel tableModel
DESCENDING
public static final int DESCENDING
- See Also:
- Constant Field Values
NOT_SORTED
public static final int NOT_SORTED
- See Also:
- Constant Field Values
ASCENDING
public static final int ASCENDING
- See Also:
- Constant Field Values
COMPARABLE_COMAPRATOR
public static final Comparator COMPARABLE_COMAPRATOR
LEXICAL_COMPARATOR
public static final Comparator LEXICAL_COMPARATOR
TableSorter
public TableSorter()
TableSorter
public TableSorter(TableModel tableModel)
TableSorter
public TableSorter(TableModel tableModel,
JTableHeader tableHeader)
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interface ActionListener
- See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)
addActionListener
public void addActionListener(ActionListener actionListener)
getTableModel
public TableModel getTableModel()
setTableModel
public void setTableModel(TableModel tableModel)
getTableHeader
public JTableHeader getTableHeader()
setTableHeader
public void setTableHeader(JTableHeader tableHeader)
isSorting
public boolean isSorting()
getSortingStatus
public int getSortingStatus(int column)
getSortPropertyName
public String getSortPropertyName(int column)
- Specified by:
getSortPropertyName
in interface ValueListTableModel
setSortingStatus
public void setSortingStatus(int column,
int status,
boolean fireChange)
getHeaderRendererIcon
protected Icon getHeaderRendererIcon(int column,
int size)
setColumnComparator
public void setColumnComparator(Class type,
Comparator comparator)
getComparator
protected Comparator getComparator(int column)
modelIndex
public int modelIndex(int viewIndex)
viewIndex
public int viewIndex(int modelIndex)
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interface TableModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interface TableModel
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName
in interface TableModel
getColumnClass
public Class getColumnClass(int column)
- Specified by:
getColumnClass
in interface TableModel
isCellEditable
public boolean isCellEditable(int row,
int column)
- Specified by:
isCellEditable
in interface TableModel
getValueAt
public Object getValueAt(int row,
int column)
- Specified by:
getValueAt
in interface TableModel
setValueAt
public void setValueAt(Object aValue,
int row,
int column)
- Specified by:
setValueAt
in interface TableModel
getSortingColumns
public List getSortingColumns()
- Returns:
- Returns the sortingColumns.
trimFromList
public int trimFromList(int maxSize)
- Specified by:
trimFromList
in interface ValueListTableModel
- See Also:
net.mlw.vlh.swing.ValueListTableModel#trimFromBottomOfList()
addBean
public int addBean(Object bean)
- Specified by:
addBean
in interface ValueListTableModel
removeBean
public int removeBean(Object bean)
- Specified by:
removeBean
in interface ValueListTableModel
getBean
public Object getBean(int row)
- Specified by:
getBean
in interface ValueListTableModel
setValueList
public void setValueList(ValueList valueList)
- Specified by:
setValueList
in interface ValueListTableModel
contains
public boolean contains(Object bean)
- Specified by:
contains
in interface ValueListTableModel
Copyright © 2003-2006 mlavilson. All Rights Reserved.