com.dlsc.flexgantt.model.gantt

## Interface ITimelineObject

- All Superinterfaces:
    Comparable<ITimelineObject>, IPropertiesOwner
  All Known Subinterfaces:
    IActivityObject, ICapacityObject, IEventlineObject
  All Known Implementing Classes:
    DefaultActivityObject, DefaultCapacityObject, DefaultEventlineObject, DefaultEventObject, DefaultTimelineObject

      public interface ITimelineObject
      extends IPropertiesOwner, Comparable<ITimelineObject>

  An interface for objects that can be placed on a timeline. The interface is being used in combination with the `DefaultGanttChartModel` and various default policy implementations. The model and the policies delegate many of their calls to the timeline object.
  Since:
    1.0
  Version:
    $Revision: 1.27 $
  Author:
    Dirk Lemmermann

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends ITimelineObject> Iterator<T>` | `getChildren()` Returns an iterator over all children timeline objects of this timeline object.
    `int` | `getDragActions()` Returns the drag actions that can be performed on the timeline object.
    `String` | `getLabel(LabelType type)` Returns labels for various purposes depending on the given label type identifier.
    `int` | `getLineIndex()` Returns the index of the line on which the timeline object is placed.
    `Object` | `getPopupObject(boolean extended)` Returns the object for the popup window.
    `Object` | `getPopupTitleObject()` Returns the object for the popup window.
    `Object` | `getStatus()` Returns a status object that can be used by the `OverviewPalette` to color the timeline objects in different colors based on some application specific information.
    `ITimeSpan` | `getTimeSpan()` Returns the time allocation of the timeline object.
    `boolean` | `isDeletable()` Determines whether the timeline object can be deleted or not.
    `boolean` | `isDurationChangeable()` Returns TRUE if the duration of the object can be modified.
    `boolean` | `isInPlaceEditable()` Returns TRUE if the object can be edited via a timeline object editor.
    `boolean` | `isParent()` Determines whether the timeline object is a parent timeline object.
    `boolean` | `isSelectable()` Returns TRUE if the timeline object can be selected.
    `boolean` | `isStartTimeChangeable()` Returns TRUE if the start time of the object can be modified.
    `void` | `setTimeSpan(ITimeSpan span)` Sets the time allocation of the timeline object.

    - ### Methods inherited from interface com.dlsc.flexgantt.model.IPropertiesOwner

      `getProperty, setProperty`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Method Detail

    - #### getLabel

          String getLabel(LabelType type)

      Returns labels for various purposes depending on the given label type identifier.
      Parameters:
        `type` - the type of label requested
      Returns:
        a label for the given purpose
      Since:
        1.0
      See Also:
        `ILabelPolicy.getLabel(TimelineObjectPath, IGanttChartModel, LabelType)`

    - #### getPopupObject

          Object getPopupObject(boolean extended)

      Returns the object for the popup window.
      Parameters:
        `extended` - a flag that signals whether the user wants to see the standard popup information or the extended version
      Returns:
        an input object for the poup
      Since:
        1.0
      See Also:
        `PopupLayer`, `IPopupRenderer`, `DefaultPopupRenderer`, `IPopupPolicy.getPopupValue(TimelineObjectPath, IGanttChartModel, boolean)`

    - #### getPopupTitleObject

          Object getPopupTitleObject()

      Returns the object for the popup window.
      Returns:
        an input object for the poup
      Since:
        1.1
      See Also:
        `PopupLayer`, `IPopupRenderer`, `DefaultPopupRenderer`, `IPopupPolicy.getPopupTitleValue(TimelineObjectPath, IGanttChartModel)`

    - #### isDeletable

          boolean isDeletable()

      Determines whether the timeline object can be deleted or not.
      Returns:
        TRUE if the object can be deleted
      Since:
        1.0
      See Also:
        `IEditTimelineObjectPolicy.isDeletable(TimelineObjectPath, IGanttChartModel)`

    - #### getTimeSpan

          ITimeSpan getTimeSpan()

      Returns the time allocation of the timeline object.
      Returns:
        the timeline's object time span
      Since:
        1.0
      See Also:
        `setTimeSpan(ITimeSpan)`

    - #### setTimeSpan

          void setTimeSpan(ITimeSpan span)

      Sets the time allocation of the timeline object.
      Parameters:
        `span` - the object's time allocation
      Since:
        1.0
      See Also:
        `getTimeSpan()`

    - #### isInPlaceEditable

          boolean isInPlaceEditable()

      Returns TRUE if the object can be edited via a timeline object editor.
      Returns:
        TRUE if the object can be edited
      Since:
        1.0
      See Also:
        `IEditTimelineObjectPolicy.isInPlaceEditable(TimelineObjectPath, IGanttChartModel)`, `ITimelineObjectEditor`

    - #### isStartTimeChangeable

          boolean isStartTimeChangeable()

      Returns TRUE if the start time of the object can be modified.
      Returns:
        TRUE if the object can be modified
      Since:
        1.0
      See Also:
        `IEditTimelineObjectPolicy.isStartTimeChangeable(TimelineObjectPath, IGanttChartModel)`

    - #### isDurationChangeable

          boolean isDurationChangeable()

      Returns TRUE if the duration of the object can be modified.
      Returns:
        TRUE if the object can be modified
      Since:
        1.0
      See Also:
        `IEditTimelineObjectPolicy.isDurationChangeable(TimelineObjectPath, IGanttChartModel)`

    - #### getDragActions

          int getDragActions()

      Returns the drag actions that can be performed on the timeline object. Timeline objects can either be moved or copied or both. The desired behaviour can be specified by using the constants defined in `DnDConstants`. Possible values are:
      - `DnDConstants.ACTION_COPY`
      - `DnDConstants.ACTION_MOVE`
      - `DnDConstants.ACTION_COPY_OR_MOVE`
      Declaring the drag actions is only half of the work needed for correct drag and drop behaviour. A timeline object might be draggable but it also needs a place where it can be dropped. The drop places are defined by `IGanttChartNode.getDropActions(Object, long)`.
      Returns:
        the supported drag actions (move, copy, or both)
      Since:
        1.0
      See Also:
        `DefaultDragAndDropCommand`, `IDragAndDropPolicy.getDragActions(TimelineObjectPath, IGanttChartModel)`

    - #### isSelectable

          boolean isSelectable()

      Returns TRUE if the timeline object can be selected.
      Returns:
        TRUE if the timeline object can be selected
      Since:
        1.0
      See Also:
        `ISelectionPolicy.isSelectable(TimelineObjectPath, IGanttChartModel)`

    - #### getLineIndex

          int getLineIndex()

      Returns the index of the line on which the timeline object is placed. The return value will only be considered if the Gantt chart node on which the timeline object is placed supports (inner / nested) lines. A return value of -1 indicates that the timeline object is not placed on a line but on the entire row instead (uses the entire row height).
      Returns:
        the index of the line on which the timeline object gets displayed (-1 if entire row height shall be used)
      Since:
        1.0
      See Also:
        `IGanttChartNode.getLineCount()`

    - #### getStatus

          Object getStatus()

      Returns a status object that can be used by the `OverviewPalette` to color the timeline objects in different colors based on some application specific information.
      Returns:
        an application specific status object
      Since:
        1.0

    - #### isParent

          boolean isParent()

      Determines whether the timeline object is a parent timeline object. A parent timeline object is associated with a list of children timeline objects. The time span of a parent is based on the overall time span of all of its children. Parent timeline objects often get visualized differently than their children.
      Returns:
        TRUE if the timeline object is a parent / contains children timeline objects
      Since:
        1.0
      See Also:
        `getChildren()`

    - #### getChildren

          <T extends ITimelineObject> Iterator<T> getChildren()

      Returns an iterator over all children timeline objects of this timeline object. This method will only get called on those timeline objects that are parent timeline objects. It is used to calculate the overall time span used by the parent.
      Type Parameters:
        `T` -
      Returns:
        an iterator over all children timeline objects
      Since:
        1.0
      See Also:
        `isParent()`

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