public class SectionDeleteCommand extends java.lang.Object implements IUndoRedoCommand
Note that this command is not added internally. This is because there is no code that automatically deletes sections from your GanttComposite. You need to create and record this command together with the code that removes the section from your composite.
Constructor and Description |
---|
SectionDeleteCommand(GanttSection section,
int index)
Creates a new undoable/redoable delete Event.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Called when the event is about to be destroyed.
|
int |
getIndex() |
GanttSection |
getSection() |
void |
redo()
Redoes an event in the chart.
|
void |
setIndex(int index) |
void |
setSection(GanttSection section) |
java.lang.String |
toString() |
void |
undo()
Undoes an event in the chart.
|
public SectionDeleteCommand(GanttSection section, int index)
section
- GanttSection
being deletedindex
- Index of GanttSection
prior to deletepublic void undo()
IUndoRedoCommand
undo
in interface IUndoRedoCommand
public void redo()
IUndoRedoCommand
redo
in interface IUndoRedoCommand
public void dispose()
IUndoRedoCommand
dispose
in interface IUndoRedoCommand
public GanttSection getSection()
public void setSection(GanttSection section)
public int getIndex()
public void setIndex(int index)
public java.lang.String toString()
toString
in class java.lang.Object