public class DefaultChangeSpreadsheetValueCommand extends AbstractCommand
DefaultGanttChartModel
and
the tree / hierarchy node implements the IGanttChartNode
interface.
Spreadsheet cells are defined by their time span (x-coordinate) and their
tree node (y-coordinate).Constructor and Description |
---|
DefaultChangeSpreadsheetValueCommand(DefaultGanttChartModel model,
IGanttChartNode node,
ISpreadsheet spreadsheet,
ITimeSpan span,
Object value)
Constructs a new command.
|
Modifier and Type | Method and Description |
---|---|
void |
executeCommand(IProgressMonitor monitor)
Executes the command.
|
DefaultGanttChartModel |
getModel()
Returns the spreadsheet model to which the cell belongs.
|
Object |
getNewValue()
Returns the new value that will be assigned to the spreadsheet cell.
|
IGanttChartNode<?> |
getNode()
Returns the node (the y-coordinate) of the spreadsheet cell.
|
Object |
getOldValue()
Returns the old value that was assigned to the spreadsheet cell.
|
ITimeSpan |
getTimeSpan()
Returns the time span (the x-coordinate) of the spreadsheet cell.
|
void |
undoCommand(IProgressMonitor monitor)
Undos the command.
|
getName, isRedoable, isRelevant, isUndoable, redoCommand, setName
public DefaultChangeSpreadsheetValueCommand(DefaultGanttChartModel model, IGanttChartNode node, ISpreadsheet spreadsheet, ITimeSpan span, Object value)
model
- the Gantt chart model on which the value of the spreadsheet
cell is storednode
- the node (y-coordinate) of the spreadsheet cellspreadsheet
- the spreadsheet that is being editedspan
- the time span (x-coordinate) of the spreadsheet cellvalue
- the new value that will be given to the spreadsheet cellpublic 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
wrongpublic DefaultGanttChartModel getModel()
public Object getNewValue()
public Object getOldValue()
public IGanttChartNode<?> getNode()
public ITimeSpan getTimeSpan()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.