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
ConstructorsConstructorDescriptionTableSortState(ColumnSortState columnSortState) TableSortState(List<ColumnSortState> sortStates) -
Method Summary
Modifier and TypeMethodDescriptionstatic TableSortStatecreateDefaultSortState(int columnModelIndex) Creates a sort state with the given column as the sorted column (sorted ascending).static TableSortStatecreateDefaultSortState(int columnModelIndex, boolean isAscending) Creates a sort state with the given column as the sorted column in the given direction.static TableSortStateCreates a sort state that represents being unsortedbooleangetColumnSortState(int columnModelIndex) intinthashCode()booleaniterator()static TableSortStaterestoreFromXML(org.jdom.Element element) toString()org.jdom.ElementMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
columnModelIndex- 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:
columnModelIndex- 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:
iteratorin 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
-