com.dlsc.flexgantt.swing.action.gantt
Class AbstractGanttChartAction<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>
Type Parameters:
T - the type of the Gantt chart
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
AbstractPrintAction, AddHighlightedTimelineObjectsAction, AlignEndTimesAction, AlignStartTimesAction, AllObjectsAction, ClearHighlightedTimelineObjectsAction, ClearPinnedPopupsAction, CollapseAllAction, CrosshairAction, DeleteTimelineObjectAction, EarliestObjectsAction, ExpandAllAction, GridAction, LatestObjectsAction, PopupAction, RedoAction, RelationshipsAction, RemoveHighlightedTimelineObjectsAction, RemoveSortingAction, SplitGanttChartAction, TimeNowAction, UndoAction

public abstract class AbstractGanttChartAction<T extends AbstractGanttChart>
extends AbstractFlexGanttAction

An abstract action implementation that is specialized on performing operations on a Gantt chart. The class provides methods for setting and getting a reference to a Gantt chart.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
Serialized Form

Field Summary
protected  T ganttChart
          Stores a reference to the Gantt chart.
 
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
protected AbstractGanttChartAction(T gc, java.lang.String name)
          Constructs a new Gant chart action.
protected AbstractGanttChartAction(T gc, java.lang.String name, javax.swing.Icon icon)
          Constructs a new Gant chart action.
 
Method Summary
 T getGanttChart()
          Returns the Gantt chart associated with the action.
 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.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
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

ganttChart

protected T extends AbstractGanttChart ganttChart
Stores a reference to the Gantt chart.

Since:
1.0
See Also:
setGanttChart(AbstractGanttChart), getGanttChart()
Constructor Detail

AbstractGanttChartAction

protected AbstractGanttChartAction(T gc,
                                   java.lang.String name,
                                   javax.swing.Icon icon)
Constructs a new Gant chart action.

Parameters:
gc - the Gantt chart on which to perform the action
name - the name of the action
icon - a graphical representation of the action
Since:
1.0

AbstractGanttChartAction

protected AbstractGanttChartAction(T gc,
                                   java.lang.String name)
Constructs a new Gant chart action.

Parameters:
gc - the Gantt chart on which to perform the action
name - the name of the action
Since:
1.0
Method Detail

setGanttChart

public void setGanttChart(T gc)
Sets a new Gantt chart to be used for performing the action.

Parameters:
gc - the Gantt chart on which to perform the action
Since:
1.0

getGanttChart

public T getGanttChart()
Returns the Gantt chart associated with the action.

Returns:
the Gantt chart on which the action will be performed
Since:
1.0