com.dlsc.flexgantt.swing.action.gantt
Class TimeNowAction<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.TimeNowAction<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
public class TimeNowAction<T extends AbstractGanttChart>
- extends AbstractGanttChartAction<T>
An action that scrolls the timeline in such a way that the current time (the
time 'now') becomes visible.
- Since:
- 1.0
- Author:
- Dirk Lemmermann
- See Also:
- Serialized Form
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 |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
boolean |
isCenterTimeNow()
Determines whether the time now will be shown centered on the screen or
flushed to the left edge of the visible area of the Gantt chart. |
void |
setCenterTimeNow(boolean center)
Determines whether the time now will be shown centered on the screen or
flushed to the left edge of the visible area of the Gantt chart. |
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 |
TimeNowAction
public TimeNowAction(T gc)
- Constructs a new action.
- Parameters:
gc
- the Gantt chart on which to invoke the action- Since:
- 1.0
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
isCenterTimeNow
public boolean isCenterTimeNow()
- Determines whether the time now will be shown centered on the screen or
flushed to the left edge of the visible area of the Gantt chart.
- Returns:
- TRUE if the time now will be shown centered
- Since:
- 1.0
setCenterTimeNow
public void setCenterTimeNow(boolean center)
- Determines whether the time now will be shown centered on the screen or
flushed to the left edge of the visible area of the Gantt chart.
- Parameters:
center
- if TRUE the time now line will be shown centered- Since:
- 1.0