public class DefaultDeleteNodeCommand extends AbstractCommand
DefaultTreeTableModel
and the deleted child node and its parent node
are both implementors of the IMutableTreeTableNode
interface.INodeEditPolicy.isDeletable(Object,
com.dlsc.flexgantt.model.treetable.ITreeTableModel)
,
INodeEditPolicy.getDeleteNodesCommand(java.util.List,
com.dlsc.flexgantt.model.treetable.ITreeTableModel)
,
Serialized FormConstructor and Description |
---|
DefaultDeleteNodeCommand(IMutableTreeTableNode child,
DefaultTreeTableModel model)
Constructs a new command.
|
Modifier and Type | Method and Description |
---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
int |
getChildIndex()
Returns the index of the deleted child node within the list of children
of the parent node.
|
IMutableTreeTableNode |
getChildNode()
Returns the deleted child node.
|
DefaultTreeTableModel |
getModel()
Returns the model to which the parent and the child node belong.
|
IMutableTreeTableNode |
getParentNode()
Returns the parent node of the node that will be / was deleted.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setName
public DefaultDeleteNodeCommand(IMutableTreeTableNode child, DefaultTreeTableModel model)
child
- the child node that will be deletedmodel
- the model to which the node belongspublic void executeCommand(IProgressMonitor monitor) throws CommandException
ICommand
monitor
- a progress monitorCommandException
- if anything during the execution of the command has gone
wrongpublic void undoCommand(IProgressMonitor monitor) throws CommandException
ICommand
monitor
- a progress monitorCommandException
- if anything during the execution of the command has gone
wrongpublic int getChildIndex()
public IMutableTreeTableNode getChildNode()
public DefaultTreeTableModel getModel()
public IMutableTreeTableNode getParentNode()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.