Package docking.widgets.table
Class TableSortState
java.lang.Object
docking.widgets.table.TableSortState
- All Implemented Interfaces:
Iterable<ColumnSortState>
Represents the concept of a table's sorted state, which is the number of sorted columns, their
sort order and their sort direction.
You can create instances of this class via the
TableSortStateEditor
.-
Constructor Summary
ConstructorDescriptionTableSortState
(ColumnSortState columnSortState) TableSortState
(List<ColumnSortState> sortStates) -
Method Summary
Modifier and TypeMethodDescriptionstatic TableSortState
createDefaultSortState
(int columnIndex) Creates a sort state with the given column as the sorted column (sorted ascending).static TableSortState
createDefaultSortState
(int columnIndex, boolean isAscending) Creates a sort state with the given column as the sorted column in the given direction.static TableSortState
Creates a sort state that represents being unsortedboolean
getColumnSortState
(int columnIndex) int
int
hashCode()
boolean
iterator()
static TableSortState
restoreFromXML
(org.jdom.Element element) toString()
org.jdom.Element
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TableSortState
public TableSortState() -
TableSortState
-
TableSortState
-
-
Method Details
-
createUnsortedSortState
Creates a sort state that represents being unsorted- Returns:
- a sort state that represents being unsorted
-
createDefaultSortState
Creates a sort state with the given column as the sorted column (sorted ascending).- Parameters:
columnIndex
- The column to sort- Returns:
- a sort state with the given column as the sorted column (sorted ascending).
- See Also:
-
createDefaultSortState
Creates a sort state with the given column as the sorted column in the given direction.- Parameters:
columnIndex
- The column to sortisAscending
- True to sort ascending; false to sort descending- Returns:
- a sort state with the given column as the sorted column (sorted ascending).
- See Also:
-
iterator
- Specified by:
iterator
in interfaceIterable<ColumnSortState>
-
getSortedColumnCount
public int getSortedColumnCount() -
isUnsorted
public boolean isUnsorted() -
getColumnSortState
-
getAllSortStates
-
equals
-
hashCode
public int hashCode() -
restoreFromXML
-
writeToXML
public org.jdom.Element writeToXML() -
toString
-