| java.lang.Object javax.swing.table.AbstractTableModel org.jfree.ui.SortableTableModel
All known Subclasses: org.jfree.ui.about.SystemPropertiesTableModel,
SortableTableModel | abstract public class SortableTableModel extends AbstractTableModel (Code) | | The base class for a sortable table model.
author: David Gilbert |
Method Summary | |
public int | getSortingColumn() Returns the index of the sorting column, or -1 if the data is not sorted
on any column. | public boolean | isAscending() Returns true if the data is sorted in ascending order, and
false otherwise. | public boolean | isSortable(int column) Returns a flag indicating whether or not a column is sortable.
Parameters: column - the column (zero-based index). | public void | setAscending(boolean flag) Sets the flag that determines whether the sort order is ascending or
descending. | public void | sortByColumn(int column, boolean ascending) Sorts the table. |
SortableTableModel | public SortableTableModel()(Code) | | Constructs a sortable table model.
|
getSortingColumn | public int getSortingColumn()(Code) | | Returns the index of the sorting column, or -1 if the data is not sorted
on any column.
the column used for sorting. |
isAscending | public boolean isAscending()(Code) | | Returns true if the data is sorted in ascending order, and
false otherwise.
true if the data is sorted in ascending order, and false otherwise. |
isSortable | public boolean isSortable(int column)(Code) | | Returns a flag indicating whether or not a column is sortable.
Parameters: column - the column (zero-based index). boolean. |
setAscending | public void setAscending(boolean flag)(Code) | | Sets the flag that determines whether the sort order is ascending or
descending.
Parameters: flag - the flag. |
sortByColumn | public void sortByColumn(int column, boolean ascending)(Code) | | Sorts the table.
Parameters: column - the column to sort on (zero-based index). Parameters: ascending - a flag to indicate ascending order or descending order. |
|
|