Class GroupByModel
- java.lang.Object
-
- java.util.Observable
-
- org.eclipse.nebula.widgets.nattable.extension.glazedlists.groupBy.GroupByModel
-
- All Implemented Interfaces:
IPersistable
public class GroupByModel extends Observable implements IPersistable
The model that is used to internally store the groupby state. It is used to define the tree structure.
-
-
Field Summary
Fields Modifier and Type Field Description static String
PERSISTENCE_KEY_GROUP_BY_COLUMN_INDEXES
-
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description GroupByModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addGroupByColumnIndex(int columnIndex)
Add the given column index to the list of column indexes that are currently grouped.void
clearGroupByColumnIndexes()
Clear the local list of indexes of columns that are currently grouped.List<Integer>
getGroupByColumnIndexes()
void
loadState(String prefix, Properties properties)
Restore the state out of the given Properties identified by the specified prefix.boolean
removeGroupByColumnIndex(int columnIndex)
Remove the given column index from the list of column indexes that are currently grouped.void
saveState(String prefix, Properties properties)
Saves the state to the given Properties using the specified prefix.void
update()
Notifies the observers about a change.-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
-
-
-
Field Detail
-
PERSISTENCE_KEY_GROUP_BY_COLUMN_INDEXES
public static final String PERSISTENCE_KEY_GROUP_BY_COLUMN_INDEXES
- See Also:
- Constant Field Values
-
-
Method Detail
-
addGroupByColumnIndex
public boolean addGroupByColumnIndex(int columnIndex)
Add the given column index to the list of column indexes that are currently grouped.- Parameters:
columnIndex
- The column index to add to the grouping.- Returns:
true
if the list did not already contain the given column index,false
if the list is unchanged.
-
removeGroupByColumnIndex
public boolean removeGroupByColumnIndex(int columnIndex)
Remove the given column index from the list of column indexes that are currently grouped.- Parameters:
columnIndex
- The column index to remove from the grouping.- Returns:
true
if the list contained the element and was therefore changed,false
if the list is unchanged.
-
clearGroupByColumnIndexes
public void clearGroupByColumnIndexes()
Clear the local list of indexes of columns that are currently grouped. This means to perform a complete ungrouping.
-
getGroupByColumnIndexes
public List<Integer> getGroupByColumnIndexes()
- Returns:
- The indexes of the columns that are currently grouped.
-
saveState
public void saveState(String prefix, Properties properties)
Description copied from interface:IPersistable
Saves the state to the given Properties using the specified prefix. Note: The prefix must be prepended to the property key to support multiple states within one Properties instance.- 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
public void loadState(String prefix, Properties properties)
Description copied from interface:IPersistable
Restore the state out of the given Properties identified by the specified prefix. Note: The prefix must be prepended to the property key to support multiple states within one Properties instance.- 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.
-
update
public void update()
Notifies the observers about a change.
-
-