|
||||||||||
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.layer.AbstractDragAndDropCommand
public abstract class AbstractDragAndDropCommand
A command that moves a given timeline object from one tree / hierarchy node
to another. Additionally the timeline object's time span can be changed at
the same time. This command can only be used in situations where the model is
an instance of DefaultGanttChartModel
, the old and the new tree node
implement the IGanttChartNode
interface, and the timeline object
implements the ITimelineObject
interface.
Constructor Summary | |
---|---|
protected |
AbstractDragAndDropCommand(IGanttChartNode owner,
ILayer layer,
DefaultGanttChartModel model,
IGanttChartNode newOwner,
DefaultGanttChartModel newModel,
int dropAction)
Constructs a new command. |
Method Summary | |
---|---|
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. |
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 |
Methods inherited from interface com.dlsc.flexgantt.command.ICommand |
---|
executeCommand, undoCommand |
Constructor Detail |
---|
protected 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
)Method Detail |
---|
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()
,
TimelineObjectPath
public 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(Object, Object, IGanttChartModel,
Object, IGanttChartModel, long)
,
IDragAndDropPolicy.getDragAndDropCommand(Object, Object,
IGanttChartModel, Object, IGanttChartModel, long, Object[], ILayer,
int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |