com.dlsc.flexgantt.swing.action.gantt

## Class UndoAction<T extends AbstractGanttChart>

- java.lang.Object
- - javax.swing.AbstractAction
  - - com.dlsc.flexgantt.swing.action.AbstractFlexGanttAction
    - - com.dlsc.flexgantt.swing.action.gantt.AbstractGanttChartAction<T>
      - - com.dlsc.flexgantt.swing.action.gantt.UndoAction<T>

- Type Parameters:
    `T` - the type of the Gantt chart
  All Implemented Interfaces:
    ICommandStackListener, ActionListener, PropertyChangeListener, Serializable, Cloneable, EventListener, Action
  Direct Known Subclasses:
    UndoActionLabeled

      public class UndoAction<T extends AbstractGanttChart>
      extends AbstractGanttChartAction<T>
      implements ICommandStackListener, PropertyChangeListener

  An action that will undo the last command that was executed.
  Since:
    1.0
  Version:
    $Revision: 1.5 $
  Author:
    Dirk Lemmermann
  See Also:
    `ICommandStack.undo(com.dlsc.flexgantt.command.IProgressMonitor)`, `ICommandStack.isUndoable()`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.dlsc.flexgantt.swing.action.gantt.AbstractGanttChartAction

      `ganttChart`

    - ### Fields inherited from class javax.swing.AbstractAction

      `changeSupport, enabled`

    - ### Fields inherited from interface javax.swing.Action

      `ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UndoAction(T gc)` Constructs a new action.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(ActionEvent e)`
    `void` | `commandStackChanged(CommandStackEvent event)` Gets called whenever the command stack changed.
    `void` | `propertyChange(PropertyChangeEvent evt)`
    `void` | `setGanttChart(T gc)` Sets a new Gantt chart to be used for performing the action.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.action.gantt.AbstractGanttChartAction

      `findFocusedTable, getGanttChart`

    - ### Methods inherited from class com.dlsc.flexgantt.swing.action.AbstractFlexGanttAction

      `getToolTipText, setToolTipText`

    - ### Methods inherited from class javax.swing.AbstractAction

      `addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UndoAction

          public UndoAction(T gc)

      Constructs a new action.
      Parameters:
        `gc` - the Gantt chart on which to invoke the action
      Since:
        1.0

  - ### Method Detail

    - #### setGanttChart

          public void setGanttChart(T gc)

      Description copied from class: `AbstractGanttChartAction`
      Sets a new Gantt chart to be used for performing the action.
      Overrides:
        `setGanttChart` in class `AbstractGanttChartAction<T extends AbstractGanttChart>`
      Parameters:
        `gc` - the Gantt chart on which to perform the action

    - #### actionPerformed

          public void actionPerformed(ActionEvent e)

      Specified by:
        `actionPerformed` in interface `ActionListener`

    - #### commandStackChanged

          public void commandStackChanged(CommandStackEvent event)

      Description copied from interface: `ICommandStackListener`
      Gets called whenever the command stack changed. The event object that is passed to this method contains information about the type of event and a reference to the command that caused the event.
      Specified by:
        `commandStackChanged` in interface `ICommandStackListener`
      Parameters:
        `event` - the event issued by the command stack

    - #### propertyChange

          public void propertyChange(PropertyChangeEvent evt)

      Specified by:
        `propertyChange` in interface `PropertyChangeListener`

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.