public class DefaultCreateEventlineObjectCommand extends AbstractCommand
DefaultEventlineModel
.DefaultEventlineModel.addEventlineObject(IEventlineObject)
,
IEventlineObject
,
IEditEventlineObjectPolicy.getCreateCommand(com.dlsc.flexgantt.model.eventline.IEventlineModel,
com.dlsc.flexgantt.model.ITimeSpan)
,
Serialized FormConstructor and Description |
---|
DefaultCreateEventlineObjectCommand(DefaultEventlineModel model,
ITimeSpan span)
Constructs a new command.
|
Modifier and Type | Method and Description |
---|---|
protected DefaultEventlineObject |
createEventlineObject()
Constructs and returns a new eventline object.
|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
DefaultEventlineObject |
getEventlineObject()
Returns the eventline object that was created.
|
DefaultEventlineModel |
getModel()
Returns the model of which the eventline object is a member.
|
ITimeSpan |
getTimeSpan()
Returns the time span that will be assigned to the newly created
eventline object.
|
void |
setEventlineObjectName(String name)
Specifies a name that will be used for the eventline object.
|
void |
setTimeSpan(ITimeSpan span)
Specifies the time span that will be assigned to the newly created
eventline object.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setName
public DefaultCreateEventlineObjectCommand(DefaultEventlineModel model, ITimeSpan span)
model
- the model of which the object is a memberspan
- the time span that will be initially assigned to the new
eventline objectpublic void executeCommand(IProgressMonitor monitor) throws CommandException
ICommand
monitor
- a progress monitorCommandException
- if anything during the execution of the command has gone
wrongpublic void undoCommand(IProgressMonitor monitor) throws CommandException
ICommand
monitor
- a progress monitorCommandException
- if anything during the execution of the command has gone
wrongprotected DefaultEventlineObject createEventlineObject()
DefaultEventlineObject
.public DefaultEventlineObject getEventlineObject()
public DefaultEventlineModel getModel()
public ITimeSpan getTimeSpan()
public void setTimeSpan(ITimeSpan span)
span
- the time span for the new eventline objectpublic void setEventlineObjectName(String name)
name
- the name of the eventline objectCopyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.