public class DefaultDragAndDropCommand extends AbstractDragAndDropCommand
DefaultGanttChartModel, the old and the new tree node
implement the IGanttChartNode interface, and the timeline object
implements the ITimelineObject interface.| Constructor and Description |
|---|
DefaultDragAndDropCommand(IGanttChartNode owner,
ILayer layer,
ITimelineObject object,
DefaultGanttChartModel model,
IGanttChartNode newOwner,
DefaultGanttChartModel newModel,
long newStartTime,
int dropAction)
Constructs a new command.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
ITimeSpan |
getNewTimeSpan()
Returns the new time span that gets assigned to the timeline object via
the command.
|
ITimeSpan |
getOldTimeSpan()
Returns the old time span that was assigned to the timeline object via
the command.
|
ITimelineObject |
getTimelineObject()
Returns the timeline object that gets dragged & dropped.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
fixRelationships, getDropAction, getLayer, getNewModel, getNewOwner, getOldModel, getOldOwnergetName, isRedoable, isRelevant, isUndoable, redoCommand, setNamepublic DefaultDragAndDropCommand(IGanttChartNode owner, ILayer layer, ITimelineObject object, DefaultGanttChartModel model, IGanttChartNode newOwner, DefaultGanttChartModel newModel, long newStartTime, int dropAction)
owner - the current owner / tree node on which to which the timeline
object is assignedlayer - the layer on which the timeline object gets currently
displayedobject - the timeline object that gets dragged & droppedmodel - the model in which the owner and the timeline object are
storednewOwner - the new owner / tree node to which the timeline object gets
assignednewModel - the new model in which the timeline object gets storednewStartTime - the time point that will be the new start time of the timeline
objectdropAction - the type of drop performed (possible values are listed in
DnDConstants)public 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
wrongpublic ITimeSpan getNewTimeSpan()
public ITimeSpan getOldTimeSpan()
public ITimelineObject getTimelineObject()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.