public class DefaultCreateNodeCommand extends AbstractCommand
DefaultTreeTableModel and the parent and the new child
node are instances of IMutableTreeTableNode.INodeEditPolicy.getCreateNodeCommand(Object,
com.dlsc.flexgantt.model.treetable.ITreeTableModel, Object, Object[]),
Serialized Form| Constructor and Description |
|---|
DefaultCreateNodeCommand(IMutableTreeTableNode parent,
DefaultTreeTableModel model,
Object key,
Object[] values)
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.
|
protected void |
fillNode(ITreeTableNode node)
Fills the newly created tree table node with the initial key and column
values.
|
IMutableTreeTableNode |
getChildNode()
Returns the newly created child node.
|
Object |
getKey()
Returns the initial key value that will be assigned to the new 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.
|
Object[] |
getValues()
Returns the initial column values that will be assigned to the new child
node.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setNamepublic DefaultCreateNodeCommand(IMutableTreeTableNode parent, DefaultTreeTableModel model, Object key, Object[] values)
parent - the parent node to which a new child node will be addedmodel - the model to which the parent node belongskey - the initial key value of the new child nodevalues - the initial column values of the new child nodepublic 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()
protected void fillNode(ITreeTableNode node)
node - the new child node that will be populated with initial values
for its key and columnspublic IMutableTreeTableNode getChildNode()
createNewNode()public Object getKey()
public Object[] getValues()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.