Package adams.gui.core
Interface SortableTable
-
- All Known Implementing Classes:
InformativeStatisticFactory.Table,InstanceReportFactory.Table,InstancesTable,InstanceTable,ReportFactory.Table,SortableAndSearchableTable,SpreadSheetCellSelector.Table,SpreadSheetRowReportFactory.Table,SpreadSheetTable,XYSequenceTable
public interface SortableTableInterface for tables that are sortable.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetSortColumn()Returns the sort column.TableModelgetUnsortedModel()returns the underlying model, can be null.booleanisAscending()Returns whether sorting is ascending or not.booleanisSorted()returns whether the table was sorted.voidsetUnsortedModel(TableModel value)Sets the base model to use.voidsort(int columnIndex)sorts the table over the given column (ascending).voidsort(int columnIndex, boolean ascending)sorts the table over the given column, either ascending or descending.
-
-
-
Method Detail
-
setUnsortedModel
void setUnsortedModel(TableModel value)
Sets the base model to use.- Parameters:
value- the base model
-
getUnsortedModel
TableModel getUnsortedModel()
returns the underlying model, can be null.- Returns:
- the current model
-
isSorted
boolean isSorted()
returns whether the table was sorted.- Returns:
- true if the table was sorted
-
getSortColumn
int getSortColumn()
Returns the sort column.- Returns:
- the sort column
-
isAscending
boolean isAscending()
Returns whether sorting is ascending or not.- Returns:
- true if ascending
- See Also:
isSorted(),getSortColumn()
-
sort
void sort(int columnIndex)
sorts the table over the given column (ascending).- Parameters:
columnIndex- the column to sort over
-
sort
void sort(int columnIndex, boolean ascending)sorts the table over the given column, either ascending or descending.- Parameters:
columnIndex- the column to sort overascending- ascending if true, otherwise descending
-
-