com.dlsc.flexgantt.model.gantt

## Class CapacityLine

- java.lang.Object
- - com.dlsc.flexgantt.model.gantt.CapacityLine

- All Implemented Interfaces:
    Comparable<CapacityLine>

      public class CapacityLine
      extends Object
      implements Comparable<CapacityLine>

  Capacity lines are used in combination with the `IResourceNode` class. The resource node can define several major and minor capacity lines. These lines can be picked up by row renderers so that they can be drawn in the background of each row. The rendering algorithm will also take the minimum and maximum capacity in account when calculating the height of capacity timeline objects (used for visualizing capacity profiles).
  Since:
    1.0
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CapacityLine(double value)` Constructs a new capacity line (the label of the line will be empty).
    `CapacityLine(double value, String label)` Constructs a new capacity line.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(CapacityLine line)`
    `double` | `getCapacity()` Returns the capacity represented by the line.
    `String` | `getLabel()` Returns the label of the capacity line.

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

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

- - ### Constructor Detail

    - #### CapacityLine

          public CapacityLine(double value,
                              String label)

      Constructs a new capacity line.
      Parameters:
        `value` - the value of the capacity line
        `label` - the label of the capacity line
      Since:
        1.0

    - #### CapacityLine

          public CapacityLine(double value)

      Constructs a new capacity line (the label of the line will be empty).
      Parameters:
        `value` - the value of the capacity line
      Since:
        1.0

  - ### Method Detail

    - #### getLabel

          public String getLabel()

      Returns the label of the capacity line.
      Returns:
        the capacity line label
      Since:
        1.0

    - #### getCapacity

          public double getCapacity()

      Returns the capacity represented by the line.
      Returns:
        the capacity represented by the line
      Since:
        1.0

    - #### compareTo

          public int compareTo(CapacityLine line)

      Specified by:
        `compareTo` in interface `Comparable<CapacityLine>`

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