|
||||||||||
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 com.dlsc.flexgantt.command.layer.DefaultDragAndDropCommand
public class DefaultDragAndDropCommand
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 | |
---|---|
DefaultDragAndDropCommand(IGanttChartNode owner,
ILayer layer,
ITimelineObject object,
DefaultGanttChartModel model,
IGanttChartNode newOwner,
DefaultGanttChartModel newModel,
long newStartTime,
int dropAction)
Constructs a new command. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.dlsc.flexgantt.command.layer.AbstractDragAndDropCommand |
---|
fixRelationships, getDropAction, getLayer, getNewModel, getNewOwner, getOldModel, getOldOwner |
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 |
Constructor Detail |
---|
public 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
)Method Detail |
---|
public void executeCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorpublic void undoCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorpublic ITimeSpan getNewTimeSpan()
public ITimeSpan getOldTimeSpan()
public ITimelineObject getTimelineObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |