|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.command.AbstractCommand com.dlsc.flexgantt.command.treetable.DefaultNodeCreateCommand
public class DefaultNodeCreateCommand
A command that creates a new child node for a given parent node and tree
table model. The command can only be used in situations where the model is an
instance of 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 FormConstructor Summary | |
---|---|
DefaultNodeCreateCommand(IMutableTreeTableNode parent,
DefaultTreeTableModel model,
java.lang.Object key,
java.lang.Object[] values)
Constructs a new command. |
Method Summary | |
---|---|
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. |
java.lang.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. |
java.lang.Object[] |
getValues()
Returns the initial column values that will be assigned to the new child node. |
void |
undoCommand(IProgressMonitor monitor)
Undos the command. |
Methods inherited from class com.dlsc.flexgantt.command.AbstractCommand |
---|
getName, isRedoable, isRelevant, isUndoable, redoCommand |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultNodeCreateCommand(IMutableTreeTableNode parent, DefaultTreeTableModel model, java.lang.Object key, java.lang.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 nodeMethod Detail |
---|
public void executeCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorpublic void undoCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorprotected 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 java.lang.Object getKey()
public java.lang.Object[] getValues()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |