public class DefaultDeleteTimelineObjectCommand extends AbstractCommand
DefaultGanttChartModel
, the timeline object implements the
ITimelineObject
interface, and the tree node implements the
IGanttChartNode
interface.IEditTimelineObjectPolicy.getDeleteCommand(com.dlsc.flexgantt.model.gantt.IGanttChartModel,
Collection)
,
DefaultGanttChartModel.removeTimelineObject(IGanttChartNode, ILayer,
ITimelineObject)
,
Serialized FormConstructor and Description |
---|
DefaultDeleteTimelineObjectCommand(IGanttChartNode node,
ILayer layer,
ITimelineObject object,
DefaultGanttChartModel model)
Constructs a new command.
|
Modifier and Type | Method and Description |
---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
ILayer |
getLayer()
Returns the layer on which the timeline object gets displayed.
|
DefaultGanttChartModel |
getModel()
Returns the model in which the tree node and the deleted timeline object
are stored.
|
IGanttChartNode |
getNode()
Returns the tree node that owns the timeline object (the object gets
shown in the row of that node).
|
ITimelineObject |
getTimelineObject()
Returns the timeline object that will / was deleted.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setName
public DefaultDeleteTimelineObjectCommand(IGanttChartNode node, ILayer layer, ITimelineObject object, DefaultGanttChartModel model)
node
- the tree node that owns the timeline object (the object is
displayed in the row of that node)layer
- the layer on which the timeline object gets displayedobject
- the timeline object that will be deletedmodel
- the model in which the node and the timeline object are storedpublic 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 ITimelineObject getTimelineObject()
public DefaultGanttChartModel getModel()
public ILayer getLayer()
public IGanttChartNode getNode()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.