public class DefaultChangeKeyCommand extends AbstractCommand
DefaultTreeTableModel
and the node implements ITreeTableNode
.INodeEditPolicy.isKeyEditable(Object,
com.dlsc.flexgantt.model.treetable.ITreeTableModel)
,
INodeEditPolicy.getChangeKeyCommand(Object,
com.dlsc.flexgantt.model.treetable.ITreeTableModel, Object)
,
Serialized FormConstructor and Description |
---|
DefaultChangeKeyCommand(DefaultMutableTreeTableNode node,
DefaultTreeTableModel model,
Object key)
Constructs a new command.
|
Modifier and Type | Method and Description |
---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
DefaultTreeTableModel |
getModel()
Returns the tree table model to which the node belongs.
|
Object |
getNewKey()
Returns the new key value.
|
ITreeTableNode |
getNode()
Returns the node that was modified.
|
Object |
getOldKey()
Returns the old key value.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setName
public DefaultChangeKeyCommand(DefaultMutableTreeTableNode node, DefaultTreeTableModel model, Object key)
node
- the node that will be modifiedmodel
- the model to which the node belongskey
- the new value of the node's keyITreeTableNode.setKey(Object)
public 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 DefaultTreeTableModel getModel()
public Object getNewKey()
public Object getOldKey()
public ITreeTableNode getNode()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.