com.dlsc.flexgantt.swing.layer.system

## Class ActionLayer

- java.lang.Object
- - com.dlsc.flexgantt.swing.layer.AbstractLayer
  - - com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer
    - - com.dlsc.flexgantt.swing.layer.system.ActionLayer

- All Implemented Interfaces:
    ITimelineObjectSelectionListener, EventListener

      public class ActionLayer
      extends AbstractSystemLayer
      implements ITimelineObjectSelectionListener

  The quick editing layer displays a component inside the layer container that can be used to edit the currently selected timeline object. Quick editing only works on a single timeline object selection and not on several selected objects at the same time.
  Since:
    2.1
  Author:
    Dirk Lemmermann

- - ### Field Summary

    - ### Fields inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `alpha, changeSupport, ganttChart, layerContainer, PROPERTY_ALPHA, PROPERTY_VISIBLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActionLayer(LayerContainer lc)` Constructs a new editing layer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IActionProvider` | `getActionProvider()` Returns the action provider that is used by this layer to lookup the available actions for a given timeline object.
    `TimelineObjectPath` | `getActiveTimelineObjectPath()` Returns the path to the currently active timeline object, meaning the object which has been selected by the user and for which action buttons are shown.
    `ActionLayerButtonPanel` | `getButtonPanel()` Returns the panel that is used to display the various action buttons.
    `int` | `getDelay()` Returns the delay that will be applied before the action panel starts to show up.
    `int` | `getFadeInDuration()` Returns the duration for the fade-in animation.
    `void` | `removeActionPanel()` Removes the panel that is containing the action buttons from the layer / layer container.
    `void` | `setActionProvider(IActionProvider actionProvider)` Sets the action provider that is used by this layer to lookup the available actions for a given timeline object.
    `void` | `setButtonPanel(ActionLayerButtonPanel panel)` Sets the panel to use for displaying the action buttons.
    `void` | `setDelay(int delay)` Sets the delay that will be applied before the action panel starts to show up.
    `void` | `setFadeInDuration(int duration)` Sets the duration for the fade-in animation.
    `void` | `valueChanged(TimelineObjectSelectionEvent evt)` Callback method that gets invoked when the selection within the observed `TimelineObjectLayer` changes.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `addPropertyChangeListener, getAlpha, getDateline, getEventline, getGanttChart, getHeight, getLayerContainer, getLayerPolicyProvider, getModel, getName, getStartRow, getTimeAt, getTimeline, getTimeLocation, getTimeSpanUsed, getToolTipText, getTreeTable, getTreeTablePolicyProvider, getWidth, isVisible, paintLayer, removePropertyChangeListener, repaint, repaint, repaint, setAlpha, setVisible, tearDown`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ActionLayer

          public ActionLayer(LayerContainer lc)

      Constructs a new editing layer.
      Parameters:
        `lc` - the layer container to which the editing layer belongs
      Since:
        1.0

  - ### Method Detail

    - #### setDelay

          public void setDelay(int delay)

      Sets the delay that will be applied before the action panel starts to show up.
      Parameters:
        `delay` - the delay before showing the action panel (in milliseconds)
      Since:
        2.1

    - #### getDelay

          public int getDelay()

      Returns the delay that will be applied before the action panel starts to show up.
      Returns:
        the delay before showing the action panel (in milliseconds)
      Since:
        2.1

    - #### setActionProvider

          public void setActionProvider(IActionProvider actionProvider)

      Sets the action provider that is used by this layer to lookup the available actions for a given timeline object.
      Parameters:
        `actionProvider` - the action provider instance
      Since:
        2.1

    - #### getActionProvider

          public IActionProvider getActionProvider()

      Returns the action provider that is used by this layer to lookup the available actions for a given timeline object.
      Returns:
        the action provider instance
      Since:
        2.1

    - #### setFadeInDuration

          public void setFadeInDuration(int duration)

      Sets the duration for the fade-in animation. Default value is 333 milliseconds.
      Parameters:
        `duration` - the animation duration
      Since:
        2.1

    - #### getFadeInDuration

          public int getFadeInDuration()

      Returns the duration for the fade-in animation. Default value is 333 milliseconds.
      Returns:
        the animation duration
      Since:
        2.1

    - #### valueChanged

          public void valueChanged(TimelineObjectSelectionEvent evt)

      Description copied from interface: `ITimelineObjectSelectionListener`
      Callback method that gets invoked when the selection within the observed `TimelineObjectLayer` changes.
      Specified by:
        `valueChanged` in interface `ITimelineObjectSelectionListener`
      Parameters:
        `evt` - the event with detailed information about the change that occured

    - #### getActiveTimelineObjectPath

          public TimelineObjectPath getActiveTimelineObjectPath()

      Returns the path to the currently active timeline object, meaning the object which has been selected by the user and for which action buttons are shown.
      Returns:
        the currently selected / active timeline object.
      Since:
        2.1

    - #### removeActionPanel

          public void removeActionPanel()

      Removes the panel that is containing the action buttons from the layer / layer container.
      Since:
        2.1

    - #### setButtonPanel

          public void setButtonPanel(ActionLayerButtonPanel panel)

      Sets the panel to use for displaying the action buttons.
      Parameters:
        `panel` - the action panel
      Since:
        2.1

    - #### getButtonPanel

          public ActionLayerButtonPanel getButtonPanel()

      Returns the panel that is used to display the various action buttons.
      Returns:
        the button panel
      Since:
        2.1

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