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:
    ActionListener, Serializable, Cloneable, EventListener, 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
  Version:
    $Revision: 1.3 $
  Author:
    Dirk Lemmermann
  See Also:
    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
    `TimeNowAction(T gc)` Constructs a new action.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(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 com.dlsc.flexgantt.swing.action.gantt.AbstractGanttChartAction

      `findFocusedTable, getGanttChart, setGanttChart`

    - ### 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

    - #### TimeNowAction

          public TimeNowAction(T gc)

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

  - ### Method Detail

    - #### actionPerformed

          public void actionPerformed(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

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