Class SortStatePersistor<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.sort.SortStatePersistor<T>
- Type Parameters:
T
- Type of the Beans in the backing data source.
- All Implemented Interfaces:
IPersistable
Handles persisting of the sorting state. The sorting state is read from and
restored to the
ISortModel
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Encapsulation of the sort state of a column -
Field Summary
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected SortStatePersistor<T>.SortState
getSortStateFromString
(String token) Parse the string representation to extract the column index, sort direction and sort ordervoid
loadState
(String prefix, Properties properties) Parses the saved string and restores the state to theISortModel
.void
saveState
(String prefix, Properties properties) Save the sorting state in the properties file.
-
Field Details
-
PERSISTENCE_KEY_SORTING_STATE
- See Also:
-
-
Constructor Details
-
SortStatePersistor
-
-
Method Details
-
saveState
Save the sorting state in the properties file.Key:
PERSISTENCE_KEY_SORTING_STATE
Format: column index : sort direction : sort order |
- Specified by:
saveState
in interfaceIPersistable
- Parameters:
prefix
- The prefix to use for the state keys. Is also used as the state configuration name.properties
- The Properties instance to save the state to.
-
loadState
Parses the saved string and restores the state to theISortModel
.- Specified by:
loadState
in interfaceIPersistable
- Parameters:
prefix
- The prefix to use for the state keys. Is also used as the state configuration name.properties
- The Properties instance to load the state from.
-
getSortStateFromString
Parse the string representation to extract the column index, sort direction and sort order
-