public abstract class AbstractDragAndDropCommand extends AbstractCommand
DefaultGanttChartModel, the old and the new tree node
implement the IGanttChartNode interface, and the timeline object
implements the ITimelineObject interface.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDragAndDropCommand(IGanttChartNode owner,
ILayer layer,
DefaultGanttChartModel model,
IGanttChartNode newOwner,
DefaultGanttChartModel newModel,
int dropAction)
Constructs a new command.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
fixRelationships(ITimelineObject object,
IGanttChartNode oldOwner,
IGanttChartNode newOwner,
DefaultGanttChartModel oldModel,
DefaultGanttChartModel newModel)
Fixes the relationship objects based on the information passed to it.
|
int |
getDropAction()
Returns the user drop action that was used when the command was
triggered.
|
ILayer |
getLayer()
Returns the layer on which the timeline object gets displayed.
|
DefaultGanttChartModel |
getNewModel()
Returns the new Gantt chart model in which the timeline object will be
stored.
|
IGanttChartNode |
getNewOwner()
Returns the new owner / tree node of the timeline object.
|
DefaultGanttChartModel |
getOldModel()
Returns the old Gantt chart model in which the timeline object was
stored.
|
IGanttChartNode |
getOldOwner()
Returns the old owner / tree node of the timeline object.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteCommand, undoCommandprotected AbstractDragAndDropCommand(IGanttChartNode owner, ILayer layer, DefaultGanttChartModel model, IGanttChartNode newOwner, DefaultGanttChartModel newModel, 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
displayedmodel - 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 storeddropAction - the type of drop performed (possible values are listed in
DnDConstants)protected void fixRelationships(ITimelineObject object, IGanttChartNode oldOwner, IGanttChartNode newOwner, DefaultGanttChartModel oldModel, DefaultGanttChartModel newModel)
object - the timeline object that was dragged & droppedoldOwner - the old owner / tree node of the timeline objectnewOwner - the new owner / tree node of the timeline objectoldModel - the old data model in which the timeline object was storednewModel - the new data model in which the timeline object is storedIRelationship,
IRelationship.getSourcePath(),
IRelationship.getTargetPath(),
IGanttChartModel.getRelationships(),
TimelineObjectPathpublic ILayer getLayer()
public DefaultGanttChartModel getNewModel()
public DefaultGanttChartModel getOldModel()
public IGanttChartNode getNewOwner()
public IGanttChartNode getOldOwner()
public int getDropAction()
DnDConstants.DnDConstants.ACTION_MOVE or
DnDConstants.ACTION_COPY).IDragAndDropPolicy.getDropActions(TimelineObjectPath,
IGanttChartModel, Object, IGanttChartModel, long),
IDragAndDropPolicy.getDragAndDropCommand(TimelineObjectPath,
IGanttChartModel, Object, IGanttChartModel, long, Object[], ILayer,
int)Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.