|
||||||||||
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.DefaultChangeTimelineObjectTimeSpanCommand
public class DefaultChangeTimelineObjectTimeSpanCommand
A command that will change the time span of a timeline object. The command is
only suitable in situations where the model is an instance of
DefaultGanttChartModel
and the object implements the
ITimelineObject
interface.
IEditTimelineObjectPolicy
,
IEditTimelineObjectPolicy.getChangeTimeSpanCommand(Object, Object,
com.dlsc.flexgantt.model.gantt.IGanttChartModel, ILayer, ITimeSpan, int)
,
ITimelineObject.setTimeSpan(ITimeSpan)
,
DefaultGanttChartModel.setTimeSpan(ITimelineObject, ITimeSpan)
,
Serialized FormConstructor Summary | |
---|---|
DefaultChangeTimelineObjectTimeSpanCommand(DefaultGanttChartNode node,
ILayer layer,
ITimelineObject object,
DefaultGanttChartModel model,
ITimeSpan span,
int dropAction)
Constructs a new command. |
Method Summary | |
---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command. |
int |
getDropAction()
Returns the type of drop that was used by the user to change the time span. |
ILayer |
getLayer()
Returns the layer where the timeline object is located. |
DefaultGanttChartModel |
getModel()
Returns the model to which the timeline object belongs. |
ITimeSpan |
getNewTimeSpan()
Returns the time span that will be / was assigned to the timeline object by the command. |
DefaultGanttChartNode |
getNode()
Returns the tree node to which the timeline object belongs. |
ITimeSpan |
getOldTimeSpan()
Returns the time span that was assigned to the timeline object before the command was executed. |
ITimelineObject |
getTimelineObject()
Returns the timeline object that was modified by the command. |
void |
undoCommand(IProgressMonitor monitor)
Undos the command. |
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 DefaultChangeTimelineObjectTimeSpanCommand(DefaultGanttChartNode node, ILayer layer, ITimelineObject object, DefaultGanttChartModel model, ITimeSpan span, int dropAction)
node
- the hierarchy / tree node on which the timeline object is
locatedlayer
- the layer where the timeline object gets displayedobject
- the timeline object that will be modified by the commandmodel
- the model from which the timeline object originatedspan
- the new time span that will be assgined to the timeline objectdropAction
- the type of drop performed by the user (possible values are
defined in DnDConstants
)Method Detail |
---|
public void executeCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorpublic void undoCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorpublic DefaultGanttChartModel getModel()
public ITimeSpan getNewTimeSpan()
public ITimeSpan getOldTimeSpan()
public ITimelineObject getTimelineObject()
public ILayer getLayer()
public DefaultGanttChartNode getNode()
public int getDropAction()
DnDConstants
.
DnDConstants
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |