Class EventDeleteCommand

    • Constructor Detail

      • EventDeleteCommand

        public EventDeleteCommand​(GanttEvent event,
                                  GanttSection section,
                                  int index)
        Creates a new undoable/redoable delete Event.
        Parameters:
        event - GanttEvent being deleted
        section - GanttSection index (of all GanttSections) prior to delete
        index - Index of event in GanttSection section prior to delete
    • Method Detail

      • 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
      • setEvent

        public void setEvent​(GanttEvent event)
      • getIndex

        public int getIndex()
      • setIndex

        public void setIndex​(int index)
      • setSection

        public void setSection​(GanttSection section)
      • toString

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