Class SectionDeleteCommand

All Implemented Interfaces:

public class SectionDeleteCommand
extends java.lang.Object
implements IUndoRedoCommand
Represents one GanttSection delete action that can be undone/redone.

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 Summary

    Constructor Description
    SectionDeleteCommand​(GanttSection section, int index)
    Creates a new undoable/redoable delete Event.
  • Method Summary

    Modifier and Type Method 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • undo

      public void undo()
      Description copied from interface: IUndoRedoCommand
      Undoes an event in the chart. This should put the event back to the state it was prior to the event taking place.
      Specified by:
      undo in interface IUndoRedoCommand
    • redo

      public void redo()
      Description copied from interface: IUndoRedoCommand
      Redoes an event in the chart. This should put the event back to the state it was after the event took place.
      Specified by:
      redo in interface IUndoRedoCommand
    • dispose

      public void dispose()
      Description copied from interface: IUndoRedoCommand
      Called when the event is about to be destroyed. If any resources need to be cleaned up you should do so here.
      Specified by:
      dispose in interface IUndoRedoCommand
    • getSection

      public GanttSection getSection()
    • setSection

      public void setSection​(GanttSection section)
    • getIndex

      public int getIndex()
    • setIndex

      public void setIndex​(int index)
    • toString

      public java.lang.String toString()
      toString in class java.lang.Object