eu.beesoft.gantt.action
Class TodayAction
java.lang.Object
javax.swing.AbstractAction
eu.beesoft.gantt.action.AbstractGanttAction
eu.beesoft.gantt.action.AbstractChartAction
eu.beesoft.gantt.action.TodayAction
- All Implemented Interfaces:
- LanguageListener, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class TodayAction
- extends AbstractChartAction
This action scrolls the date/time columns in the ChartComponent
so
the column with today date is visible. You can set any date for this action
as today date.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
enabled, changeSupport |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary |
TodayAction(JGantt component)
Creates a new instance of TodayAction. |
Method Summary |
protected boolean |
executeAction(java.awt.event.ActionEvent event,
UndoStep undo)
Scrolls the date/time columns in the ChartComponent so the column
with date returned by getDate() is visible. |
java.util.Date |
getDate()
Returns Date instance which is set for this action. |
void |
setDate(java.util.Date date)
Sets a new date for this action. |
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 |
TodayAction
public TodayAction(JGantt component)
- Creates a new instance of TodayAction.
- Parameters:
component
- JGantt instance to which this action belongs
getDate
public java.util.Date getDate()
- Returns Date instance which is set for this action.
- Returns:
- date for Today action
setDate
public void setDate(java.util.Date date)
- Sets a new date for this action.
- Parameters:
date
- new date value
executeAction
protected boolean executeAction(java.awt.event.ActionEvent event,
UndoStep undo)
- Scrolls the date/time columns in the
ChartComponent
so the column
with date returned by getDate()
is visible.
- Specified by:
executeAction
in class AbstractGanttAction
- Parameters:
event
- - event that invoked this actionundo
- - register for undo / redo operations
- Returns:
- true if action finished successfully