public class DefaultInsertNodeCommand extends AbstractCommand
DefaultTreeTableModel
and the parent and the new child node are instances of
IMutableTreeTableNode.INodeEditPolicy.getInsertNodeCommand(Object, int,
com.dlsc.flexgantt.model.treetable.ITreeTableModel),
Serialized Form| Constructor and Description |
|---|
DefaultInsertNodeCommand(IMutableTreeTableNode parent,
int childIndex,
DefaultTreeTableModel model)
Constructs a new command.
|
| Modifier and Type | Method and Description |
|---|---|
protected IMutableTreeTableNode |
createNewNode()
Creates the new child node instance of type
DefaultGanttChartNode
. |
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
int |
getChildIndex()
Returns the index of the child node as it was passed to the command.
|
IMutableTreeTableNode |
getChildNode()
Returns the newly created child node.
|
DefaultTreeTableModel |
getModel()
The model to which the parent node and the new child node belong.
|
IMutableTreeTableNode |
getParentNode()
Returns the parent node that received a new child node.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setNamepublic DefaultInsertNodeCommand(IMutableTreeTableNode parent, int childIndex, DefaultTreeTableModel model)
parent - the parent node to which a new child node will be addedchildIndex - the child index of the new nodemodel - the model to which the parent node belongspublic void executeCommand(IProgressMonitor monitor) throws CommandException
ICommandmonitor - a progress monitorCommandException - if anything during the execution of the command has gone
wrongpublic void undoCommand(IProgressMonitor monitor) throws CommandException
ICommandmonitor - a progress monitorCommandException - if anything during the execution of the command has gone
wrongprotected IMutableTreeTableNode createNewNode()
DefaultGanttChartNode
. Subclasses are free to override in order to return specialized tree
node types.public IMutableTreeTableNode getParentNode()
public DefaultTreeTableModel getModel()
public IMutableTreeTableNode getChildNode()
createNewNode()public int getChildIndex()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.