public class DefaultChangeEventlineObjectTimeSpanCommand extends AbstractCommand
DefaultEventlineModel
and the eventline object implements the IEventlineObject
interface.DefaultEventlineModel.setTimeSpan(IEventlineObject, ITimeSpan)
,
IEventlineObject
,
IEditEventlineObjectPolicy.getChangeTimeSpanCommand(Object,
com.dlsc.flexgantt.model.eventline.IEventlineModel, ITimeSpan)
,
Serialized FormConstructor and Description |
---|
DefaultChangeEventlineObjectTimeSpanCommand(IEventlineObject object,
DefaultEventlineModel model,
ITimeSpan span)
Constructs a new command.
|
Modifier and Type | Method and Description |
---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
ITimelineObject |
getEventlineObject()
Returns the eventline object that received a new time span.
|
DefaultEventlineModel |
getModel()
Returns the eventline model to which the eventline object belongs.
|
ITimeSpan |
getNewTimeSpan()
Returns the new time span that was assigned to the eventline object
through the command.
|
ITimeSpan |
getOldTimeSpan()
Returns the old time span that was assigned to the eventline object
before the command was executed.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setName
public DefaultChangeEventlineObjectTimeSpanCommand(IEventlineObject object, DefaultEventlineModel model, ITimeSpan span)
object
- the eventline object that will be modifiedmodel
- the model to which the eventline object belongsspan
- the new time span that will be assigned to the eventline
objectpublic void executeCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorpublic void undoCommand(IProgressMonitor monitor)
ICommand
monitor
- a progress monitorpublic DefaultEventlineModel getModel()
public ITimeSpan getNewTimeSpan()
public ITimeSpan getOldTimeSpan()
public ITimelineObject getEventlineObject()
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.