public class DefaultChangePercentageCommand extends AbstractCommand
DefaultGanttChartModel and timeline objects that implement the
IActivityObject interface.IActivityObject.setPercentageComplete(double),
IEditActivityObjectPolicy.isPercentageChangeable(com.dlsc.flexgantt.model.gantt.TimelineObjectPath,
com.dlsc.flexgantt.model.gantt.IGanttChartModel),
IEditActivityObjectPolicy.getChangePercentageCommand(com.dlsc.flexgantt.model.gantt.TimelineObjectPath,
com.dlsc.flexgantt.model.gantt.IGanttChartModel, double),
Serialized Form| Constructor and Description |
|---|
DefaultChangePercentageCommand(IActivityObject object,
DefaultGanttChartModel model,
double percentage)
Constructs a new command.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
IActivityObject |
getActivityObject()
Returns the activity object that was / will be modified.
|
DefaultGanttChartModel |
getModel()
Returns the model to which the activity object belongs.
|
double |
getNewPercentage()
Returns the new value that will be used for the percentage
complete value.
|
double |
getOldPercentage()
Returns the old percentage complete value.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setNamepublic DefaultChangePercentageCommand(IActivityObject object, DefaultGanttChartModel model, double percentage)
object - the activity object that will be modifiedmodel - the model to which the object belongspercentage - the new percentage complete value (0 <= p <= 100)public 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 IActivityObject getActivityObject()
public DefaultGanttChartModel getModel()
public double getNewPercentage()
public double getOldPercentage()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.