com.dlsc.flexgantt.swing.action.timeline

## Class ScrollTimelineAction

- java.lang.Object
- - javax.swing.AbstractAction
  - - com.dlsc.flexgantt.swing.action.AbstractFlexGanttAction
    - - com.dlsc.flexgantt.swing.action.timeline.AbstractTimelineAction
      - - com.dlsc.flexgantt.swing.action.timeline.ScrollTimelineAction

- All Implemented Interfaces:
    ActionListener, Serializable, Cloneable, EventListener, Action

      public class ScrollTimelineAction
      extends AbstractTimelineAction

  An action that is capable of scrolling the timeline to the left or right (normal or fast speed).
  Since:
    1.1
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ScrollTimelineAction.ScrollDirection` Lists the possible directions.

  - ### Field Summary

    - ### Fields inherited from class com.dlsc.flexgantt.swing.action.timeline.AbstractTimelineAction

      `timeline`

    - ### 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
    `ScrollTimelineAction(Timeline timeline, ScrollTimelineAction.ScrollDirection dir, boolean fast)` Constructs a new action.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(ActionEvent e)`
    `ScrollTimelineAction.ScrollDirection` | `getDirection()` Returns the scrolling direction defined on this action.
    `boolean` | `isFast()` Determines whether the scrolling will be slow or fast.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.action.timeline.AbstractTimelineAction

      `getTimeline, setTimeline`

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

    - #### ScrollTimelineAction

          public ScrollTimelineAction(Timeline timeline,
                                      ScrollTimelineAction.ScrollDirection dir,
                                      boolean fast)

      Constructs a new action. When invoked this method will delegate to the following two methods: `Timeline.scrollLeft(boolean)` and `Timeline.scrollRight(boolean)`.
      Parameters:
        `timeline` - the timeline that will be scrolled.
        `dir` - the direction into which to scroll
        `fast` - a flag indicating whether the scrolling should be fast or slow
      Since:
        1.0

  - ### Method Detail

    - #### actionPerformed

          public void actionPerformed(ActionEvent e)

    - #### getDirection

          public ScrollTimelineAction.ScrollDirection getDirection()

      Returns the scrolling direction defined on this action.
      Returns:
        the scrolling direction
      Since:
        1.1

    - #### isFast

          public boolean isFast()

      Determines whether the scrolling will be slow or fast.
      Returns:
        TRUE if the scrolling will be fast
      Since:
        1.1

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