com.dlsc.flexgantt.model.gantt
Class CapacityLine

java.lang.Object
  extended by com.dlsc.flexgantt.model.gantt.CapacityLine
All Implemented Interfaces:
java.lang.Comparable<CapacityLine>

public class CapacityLine
extends java.lang.Object
implements java.lang.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
Author:
Dirk Lemmermann

Constructor Summary
CapacityLine(double value)
          Constructs a new capacity line (the label of the line will be empty).
CapacityLine(double value, java.lang.String label)
          Constructs a new capacity line.
 
Method Summary
 int compareTo(CapacityLine line)
           
 double getCapacity()
          Returns the capacity represented by the line.
 java.lang.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,
                    java.lang.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 java.lang.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 java.lang.Comparable<CapacityLine>