public class DefaultChangeCapacityCommand extends AbstractCommand
DefaultGanttChartModel and the timeline object implements
the ICapacityObject interface.ICapacityObject.setCapacityUsed(double),
IEditCapacityObjectPolicy.isCapacityChangeable(com.dlsc.flexgantt.model.gantt.TimelineObjectPath,
com.dlsc.flexgantt.model.gantt.IGanttChartModel),
IEditCapacityObjectPolicy.getChangeCapacityCommand(com.dlsc.flexgantt.model.gantt.TimelineObjectPath,
com.dlsc.flexgantt.model.gantt.IGanttChartModel, double),
Serialized Form| Constructor and Description |
|---|
DefaultChangeCapacityCommand(ICapacityObject object,
DefaultGanttChartModel model,
double capacity)
Constructs a new command.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
ICapacityObject |
getCapacityObject()
Returns the capacity object that was / will be modified by the command.
|
DefaultGanttChartModel |
getModel()
Returns the model to which the capacity object belongs.
|
double |
getNewCapacity()
Returns the new capacity that will be / was assigned to the capacity
object.
|
double |
getOldCapacity()
Returns the old capacity that was assigned to the capacity object.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setNamepublic DefaultChangeCapacityCommand(ICapacityObject object, DefaultGanttChartModel model, double capacity)
object - the capacity object that will be modifiedmodel - the model to which the object belongscapacity - the capacity that will be assigned to the objectpublic void executeCommand(IProgressMonitor monitor) throws CommandException
ICommandmonitor - a progress monitorCommandException - if anything during the execution of the command has gone
wrongpublic void undoCommand(IProgressMonitor monitor) throws CommandException
ICommandmonitor - a progress monitorCommandException - if anything during the execution of the command has gone
wrongpublic ICapacityObject getCapacityObject()
public DefaultGanttChartModel getModel()
public double getNewCapacity()
public double getOldCapacity()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.