Class HighLowChartActivityBase<T>

java.lang.Object
com.flexganttfx.model.activity.ActivityBase<T>
com.flexganttfx.model.activity.HighLowChartActivityBase<T>
Type Parameters:
T - the type of the optional user object
All Implemented Interfaces:
Activity, HighLowChartActivity
Direct Known Subclasses:
MutableHighLowChartActivityBase

public class HighLowChartActivityBase<T>
extends ActivityBase<T>
implements HighLowChartActivity
The base implementation of a high-low activity, which are used in combination with a ChartLayout. A typical use-case for such activities are candle-stick diagrams used for plotting historical stock prices.
Since:
1.0
  • Field Details

    • low

      protected double low
    • high

      protected double high
  • Constructor Details

    • HighLowChartActivityBase

      public HighLowChartActivityBase()
      Constructs a new high-low activity. The initial high and low values will both be equal to zero. The start time will be equal to Instant.now() and the end time will be equal to Instant.now() plus ActivityBase.DEFAULT_DURATION.
      Since:
      1.0
    • HighLowChartActivityBase

      public HighLowChartActivityBase​(double low, double high, Instant startTime, Instant endTime)
      Constructs a new high-low activity with the given initial high and low values and the given start and end time.
      Parameters:
      low - the low value of the activity
      high - the high value of the activity
      startTime - the start time of the activity
      endTime - the end time of the activity
      Throws:
      IllegalArgumentException - if low is larger than high
      Since:
      1.0
    • HighLowChartActivityBase

      public HighLowChartActivityBase​(double low, double high, Instant time)
      Constructs a new high-low activity with the given initial high and low values and the start and end time set to the given time.
      Parameters:
      low - the low value of the activity
      high - the high value of the activity
      time - the start and end time of the activity
      Throws:
      IllegalArgumentException - if low is larger than high
      Since:
      1.0
  • Method Details