com.dlsc.flexgantt.model.gantt

## Interface IRelationship<T>

- Type Parameters:
    `T` - the object type of the timeline objects
  All Known Subinterfaces:
    IConstraint<T,S>
  All Known Implementing Classes:
    AbstractConstraint, DefaultRelationship, SimpleGranularityConstraint, TimeGranularityConstraint

      public interface IRelationship<T>

  Timeline objects may have some kind of relationship between each other. To visualize this relationship (which might be a dependency / constraint like "finish before start") lines with arrows can be drawn between them. To enable the user interface to draw these lines a relationship object needs to return the related timeline objects plus the tree paths to locate the row on which they are displayed. The path and the timeline object information is encapsulated in instances of type `TimelineObjectPath`.
  Since:
    1.0
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann
  See Also:
    `RelationshipLayer`, `IGanttChartModel.getRelationships()`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getLabel(LabelType type)` Returns a label for the given type / purpose.
    `Object` | `getPopupObject(boolean extended)` Returns the object to be shown inside the popup window when the mouse cursor hovers over the relationship.
    `Object` | `getPopupTitleObject()` The title used for the popup window.
    `TimelineObjectPath<T>` | `getSourcePath()` Returns the tree path information that can be used to locate the row on which the source timeline object is displayed.
    `TimelineObjectPath<T>` | `getTargetPath()` Returns the tree path information that can be used to locate the row on which the target timeline object is displayed.
    `RelationshipType` | `getType()` The type of relationship expressed by the line drawn between two timeline objects.
    `boolean` | `isDeletable()` Determines if the user is allowed to delete the relationship.
    `boolean` | `isSelectable()` Determines if the user is allowed to select the relationship by clicking on it.
    `void` | `setSourcePath(TimelineObjectPath<T> path)` Sets a new tree path that can be used to locate the row on which the source timeline object is displayed.
    `void` | `setTargetPath(TimelineObjectPath<T> path)` Sets a new tree path that can be used to locate the row on which the target timeline object is displayed.
    `void` | `setType(RelationshipType type)` Sets the relationship type expressed by the line drawn between two timeline objects.

- - ### Method Detail

    - #### getLabel

          String getLabel(LabelType type)

      Returns a label for the given type / purpose.
      Parameters:
        `type` - the label type
      Returns:
        the text for the given label type
      Since:
        2.0

    - #### setSourcePath

          void setSourcePath(TimelineObjectPath<T> path)

      Sets a new tree path that can be used to locate the row on which the source timeline object is displayed.
      Parameters:
        `path` - the new source path
      Since:
        1.0

    - #### getSourcePath

          TimelineObjectPath<T> getSourcePath()

      Returns the tree path information that can be used to locate the row on which the source timeline object is displayed.
      Returns:
        the tree path to the row where the source object is located
      Since:
        1.0

    - #### setTargetPath

          void setTargetPath(TimelineObjectPath<T> path)

      Sets a new tree path that can be used to locate the row on which the target timeline object is displayed.
      Parameters:
        `path` - the new target path
      Since:
        1.0

    - #### getTargetPath

          TimelineObjectPath<T> getTargetPath()

      Returns the tree path information that can be used to locate the row on which the target timeline object is displayed.
      Returns:
        the tree path to the row where the target object is located
      Since:
        1.0

    - #### isSelectable

          boolean isSelectable()

      Determines if the user is allowed to select the relationship by clicking on it.
      Returns:
        TRUE if the user can select the relationship
      Since:
        2.0

    - #### isDeletable

          boolean isDeletable()

      Determines if the user is allowed to delete the relationship.
      Returns:
        TRUE if the user is allowed to delete it
      Since:
        2.0

    - #### getPopupObject

          Object getPopupObject(boolean extended)

      Returns the object to be shown inside the popup window when the mouse cursor hovers over the relationship.
      Parameters:
        `extended` - if TRUE the user wants to see the extended popup information
      Returns:
        the popup input object
      Since:
        2.0

    - #### getPopupTitleObject

          Object getPopupTitleObject()

      The title used for the popup window.
      Returns:
        the popup title
      Since:
        2.0

    - #### getType

          RelationshipType getType()

      The type of relationship expressed by the line drawn between two timeline objects.
      Returns:
        the relationship type
      Since:
        2.0

    - #### setType

          void setType(RelationshipType type)

      Sets the relationship type expressed by the line drawn between two timeline objects.
      Parameters:
        `type` - the relationship type
      Since:
        2.1

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