| Modifier and Type | Field and Description |
|---|---|
| public static final int | ADD_NODE
Adding of a single node (group). |
| private final int | m_editType
The type of the editing (ADD_NODE, REMOVE_NODE_KEEP_CHILDREN, REMOVE_NODE_AND_CHILDREN) |
| private final GroupTreeNodeViewModel | m_groupsRootHandle
The root of the global groups tree |
| private final List | m_pathToNode
The path to the edited subtree's root node |
| private final GroupTreeNode | m_subtreeBackup
The subtree that was added or removed |
| private final int | m_subtreeRootChildCount
In case of removing a node but keeping all of its children, the number of children has to be stored. |
| public static final int | REMOVE_NODE_AND_CHILDREN
Removal of a node and all of its children. |
| public static final int | REMOVE_NODE_KEEP_CHILDREN
Removal of a single node. |
| Access | Constructor and Description |
|---|---|
| public | UndoableAddOrRemoveGroup(GroupTreeNodeViewModel
The global groups root. groupsRoot, GroupTreeNodeViewModel The edited node (which was added or will be removed). The node
must be a descendant of node groupsRoot! This means
that, in case of adding, you first have to add it to the tree,
then call this constructor. When removing, you first have to
call this constructor, then remove the node. editedNode, int The type of editing (ADD_NODE, REMOVE_NODE_KEEP_CHILDREN,
REMOVE_NODE_AND_CHILDREN) editType)Creates an object that can undo/redo an edit event. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public String | getPresentationName()
Overrides javax. Implements javax. This default implementation returns "". |
| public void | redo()
Overrides javax. Implements javax. Throws |
| public void | undo()
Overrides javax. Implements javax. Throws |
| ADD_NODE | back to summary |
|---|---|
| public static final int ADD_NODE Adding of a single node (group). | |
| m_editType | back to summary |
|---|---|
| private final int m_editType The type of the editing (ADD_NODE, REMOVE_NODE_KEEP_CHILDREN, REMOVE_NODE_AND_CHILDREN) | |
| m_groupsRootHandle | back to summary |
|---|---|
| private final GroupTreeNodeViewModel m_groupsRootHandle The root of the global groups tree | |
| m_pathToNode | back to summary |
|---|---|
| private final List<Integer> m_pathToNode The path to the edited subtree's root node | |
| m_subtreeBackup | back to summary |
|---|---|
| private final GroupTreeNode m_subtreeBackup The subtree that was added or removed | |
| m_subtreeRootChildCount | back to summary |
|---|---|
| private final int m_subtreeRootChildCount In case of removing a node but keeping all of its children, the number of children has to be stored. | |
| REMOVE_NODE_AND_CHILDREN | back to summary |
|---|---|
| public static final int REMOVE_NODE_AND_CHILDREN Removal of a node and all of its children. | |
| REMOVE_NODE_KEEP_CHILDREN | back to summary |
|---|---|
| public static final int REMOVE_NODE_KEEP_CHILDREN Removal of a single node. Children, if any, are kept. | |
| UndoableAddOrRemoveGroup | back to summary |
|---|---|
| public UndoableAddOrRemoveGroup(GroupTreeNodeViewModel groupsRoot, GroupTreeNodeViewModel editedNode, int editType) Creates an object that can undo/redo an edit event.
| |
| doOperation | back to summary |
|---|---|
| private void doOperation(boolean undo) | |
| getPresentationName | back to summary |
|---|---|
| public String getPresentationName() Overrides javax. Implements javax. Doc from javax. This default implementation returns "". Used by
| |
| redo | back to summary |
|---|---|
| public void redo() Overrides javax. Implements javax. Doc from javax. Throws
| |
| undo | back to summary |
|---|---|
| public void undo() Overrides javax. Implements javax. Doc from javax. Throws
| |