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 SortableTable
Interface 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 int
getSortColumn()
Returns the sort column.TableModel
getUnsortedModel()
returns the underlying model, can be null.boolean
isAscending()
Returns whether sorting is ascending or not.boolean
isSorted()
returns whether the table was sorted.void
setUnsortedModel(TableModel value)
Sets the base model to use.void
sort(int columnIndex)
sorts the table over the given column (ascending).void
sort(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
-
-