com.dlsc.flexgantt.swing.action.gantt
Class UndoActionLabeled<T extends AbstractGanttChart>

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.dlsc.flexgantt.swing.action.AbstractFlexGanttAction
          extended by com.dlsc.flexgantt.swing.action.gantt.AbstractGanttChartAction<T>
              extended by com.dlsc.flexgantt.swing.action.gantt.UndoAction<T>
                  extended by com.dlsc.flexgantt.swing.action.gantt.UndoActionLabeled<T>
Type Parameters:
T - the type of the Gantt chart
All Implemented Interfaces:
ICommandStackListener, java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class UndoActionLabeled<T extends AbstractGanttChart>
extends UndoAction<T>

An action that will undo the last command that was executed. The action will also update its name based on the name of that command (useful for showing inside a menu item).

Since:
1.0
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, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
UndoActionLabeled(T gc)
          Constructs a new action.
 
Method Summary
 void commandStackChanged(CommandStackEvent event)
          Gets called whenever the command stack changed.
 
Methods inherited from class com.dlsc.flexgantt.swing.action.gantt.UndoAction
actionPerformed, propertyChange, setGanttChart
 
Methods inherited from class com.dlsc.flexgantt.swing.action.gantt.AbstractGanttChartAction
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

UndoActionLabeled

public UndoActionLabeled(T gc)
Constructs a new action.

Parameters:
gc - the Gantt chart on which to invoke the action
Since:
1.0
Method Detail

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
Overrides:
commandStackChanged in class UndoAction<T extends AbstractGanttChart>
Parameters:
event - the event issued by the command stack