com.dlsc.flexgantt.policy.layer

## Class TimeGranularityDragInfoPolicy

- java.lang.Object
- - com.dlsc.flexgantt.policy.AbstractPolicy
  - - com.dlsc.flexgantt.policy.layer.DefaultDragInfoPolicy
    - - com.dlsc.flexgantt.policy.layer.TimeGranularityDragInfoPolicy

- All Implemented Interfaces:
    IPolicy, IDragInfoPolicy

      public class TimeGranularityDragInfoPolicy
      extends DefaultDragInfoPolicy

  A drag info policy that is being used when the currently used dateline model is an instance of `TimeGranularityDatelineModel`.
  Since:
    1.0
  Version:
    $Revision: 1.3 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimeGranularityDragInfoPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DateFormat` | `getDateFormat()` Returns the date formatting object used by the policy to create nicely formatted date strings for the date info.
    `Object` | `getDragInfo(TimelineObjectPath path, IGanttChartModel model, IDatelineModel<?> datelineModel, Object dropNode, ITimeSpan dropSpan)` Returns an object that can be used to show information during a drag operation (e.g. time span over which the dragged timeline object hovers).
    `void` | `setDateFormat(DateFormat format)` Sets the date formatting object used by the policy to create nicely formatted date strings for the date info.

    - ### Methods inherited from class com.dlsc.flexgantt.policy.layer.DefaultDragInfoPolicy

      `getCapacityFormatter, getDragInfo, getDragInfo, getPercentageFormatter, setCapacityFormatter, setPercentageFormatter`

    - ### Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy

      `assertClass`

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

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

- - ### Constructor Detail

    - #### TimeGranularityDragInfoPolicy

          public TimeGranularityDragInfoPolicy()

  - ### Method Detail

    - #### getDragInfo

          public Object getDragInfo(TimelineObjectPath path,
                                    IGanttChartModel model,
                                    IDatelineModel<?> datelineModel,
                                    Object dropNode,
                                    ITimeSpan dropSpan)

      Description copied from interface: `IDragInfoPolicy`
      Returns an object that can be used to show information during a drag operation (e.g. time span over which the dragged timeline object hovers). The default implementation returns the timeline object itself.
      Specified by:
        `getDragInfo` in interface `IDragInfoPolicy`
      Overrides:
        `getDragInfo` in class `DefaultDragInfoPolicy`
      Parameters:
        `path` - the path to the dragged timeline object
        `model` - the model to which the dragged timeline object belongs
        `datelineModel` - the model used by the dateline
        `dropNode` - the tree node over which the dragged object hovers
        `dropSpan` - the span over which the dragged object hovers
      Returns:
        an arbitrary object that can contain information relevant for a drag info renderer

    - #### getDateFormat

          public DateFormat getDateFormat()

      Returns the date formatting object used by the policy to create nicely formatted date strings for the date info.
      Returns:
        the date formatter used by the policy
      Since:
        1.0

    - #### setDateFormat

          public void setDateFormat(DateFormat format)

      Sets the date formatting object used by the policy to create nicely formatted date strings for the date info.
      Parameters:
        `format` - the date formatter used by the policy
      Since:
        1.0

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