Interface IXYTimeSeriesPlotBuilder<T extends IXYTimeSeriesPlotBuilder<T>>

Type Parameters:
T - The method chaining return type, which must be the type of the builder implementing this interface.
All Known Implementing Classes:
OhlcPlotBuilder, VolumeXYPlotBuilder, XYTimeSeriesPlotBuilder

public interface IXYTimeSeriesPlotBuilder<T extends IXYTimeSeriesPlotBuilder<T>>
Interface for all time series based XYPlot builders. Uses a generic to specify the concrete implementation of the interface as the return type of setter methods. This is done to support method chaining on the same builder instance. In this framework there can be different builder types that have specialized methods. If the return types were made to be this interface instead of the concrete class then those specialized methods of the classes not defined in the interface would be hidden by only having access to the interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    Registers an IXYAnnotationBuilder whose build() method will be called to generate its XYAnnotation when this plot builder's build() method is called.
    Sets the axis color to use when building the plot.
    Sets the axis font color to use when building the plot.
    Sets the plot background color to use when building the plot.
    org.jfree.chart.plot.XYPlot
    Builds the XYPlot from all configured data and properties.
    Deprecated.
    This facility is replaced by majorGrid(boolean) and minorGrid(boolean), and will be removed in a future release.
    Sets the zero-based index range used to index into all source data for building the XYPlot.
    majorGrid(boolean enabled)
    Toggles displaying major grid lines ON or OFF.
    Sets the major grid color to use when building the plot.
    Sets the major grid line style to use when building the plot.
    Registers a MarkerBuilder whose build() method will be called to generate its plot line when this plot builder'sbuild() method is called.
    minorGrid(boolean enabled)
    Toggles displaying minor grid lines ON or OFF.
    Sets the minor grid color to use when building the plot.
    Sets the minor grid line style to use when building the plot.
    Sets displaying all grid lines OFF.
    int
    Gets the currently configured plot weight.
    plotWeight(int weight)
    Sets the plot weight to be attributed to the plot.
    Registers an IXYTimeSeriesBuilder whose build() method will be called to generate its XYTimeSeries when this plot builder's build() method is called.
    Registers an IXYDatasetBuilder whose build() method will be called to generate its XYDataset when this plot builder's build() method is called.
    showTimeGaps(boolean showTimeGaps)
    Toggle whether to show time gaps at x-values where there is no corresponding time instance.
    timeData(long[] timeData)
    Sets the date-time values to be used when building the plot.
    xAxis(org.jfree.chart.axis.ValueAxis xAxis)
    Sets the x-axis used when building the plot.
    Sets the plot's y-axis name.
    yAxisRange(double lower, double upper)
    Sets an explicit y-axis value range to use instead of having the y-axis auto-calculate it.
    yAxisTickSize(double size)
    Sets the plot's y-axis tick size.
    Sets the plot's y-axis tick format.
  • Method Details

    • timeData

      T timeData(long[] timeData)
      Sets the date-time values to be used when building the plot.
      Parameters:
      timeData - The date-time values representing the milliseconds since the epoch start
      Returns:
      Reference to this builder instance for method chaining
    • showTimeGaps

      T showTimeGaps(boolean showTimeGaps)
      Toggle whether to show time gaps at x-values where there is no corresponding time instance.
      Parameters:
      showTimeGaps - True to show time gaps, false otherwise.
      Returns:
      Reference to this builder instance for method chaining
    • indexRange

      T indexRange(ZeroBasedIndexRange indexRange)
      Sets the zero-based index range used to index into all source data for building the XYPlot. This is an optimization to allow clients to supply existing data without having to copy and/or crop it to match the desired size axis range in the chart.
      Parameters:
      indexRange - The index range to be set
      Returns:
      Reference to this builder instance for method chaining
    • xAxis

      T xAxis(org.jfree.chart.axis.ValueAxis xAxis)
      Sets the x-axis used when building the plot.
      Parameters:
      xAxis - The axis to be set
      Returns:
      Reference to this builder instance for method chaining
    • series

      T series(IXYTimeSeriesBuilder<?> series)
      Registers an IXYTimeSeriesBuilder whose build() method will be called to generate its XYTimeSeries when this plot builder's build() method is called.
      Parameters:
      series - The series builder representing the series that it will build
      Returns:
      Reference to this builder instance for method chaining
    • series

      T series(IXYTimeSeriesDatasetBuilder<?> series)
      Registers an IXYDatasetBuilder whose build() method will be called to generate its XYDataset when this plot builder's build() method is called.
      Parameters:
      series - The series builder representing the series that it will build
      Returns:
      Reference to this builder instance for method chaining
    • marker

      T marker(MarkerBuilder marker)
      Registers a MarkerBuilder whose build() method will be called to generate its plot line when this plot builder'sbuild() method is called.
      Parameters:
      marker - The marker builder representing the marker that it will build
      Returns:
      Reference to this builder instance for method chaining
    • annotation

      T annotation(IXYAnnotationBuilder<?> annotation)
      Registers an IXYAnnotationBuilder whose build() method will be called to generate its XYAnnotation when this plot builder's build() method is called.
      Parameters:
      annotation - The annotation builder representing the annotation that it will build
      Returns:
      Reference to this builder instance for method chaining
    • plotWeight

      T plotWeight(int weight)
      Sets the plot weight to be attributed to the plot. A default of 1 will be used if this is not set.
      Parameters:
      weight - The plot weight to be set
      Returns:
      Reference to this builder instance for method chaining
    • plotWeight

      int plotWeight()
      Gets the currently configured plot weight.
      Returns:
      The plot weight
    • yAxisName

      T yAxisName(String name)
      Sets the plot's y-axis name.
      Parameters:
      name - The axis name to be set
      Returns:
      Reference to this builder instance for method chaining
    • yAxisRange

      T yAxisRange(double lower, double upper) throws IllegalArgumentException
      Sets an explicit y-axis value range to use instead of having the y-axis auto-calculate it.
      Parameters:
      lower - The lower bound to be set
      upper - The upper bound to be set
      Returns:
      Reference to this builder instance for method chaining
      Throws:
      IllegalArgumentException - If the lower bound is greater than the upper one
    • yAxisTickSize

      T yAxisTickSize(double size)
      Sets the plot's y-axis tick size.
      Parameters:
      size - The tick size to be set
      Returns:
      Reference to this builder instance for method chaining
    • yTickFormat

      T yTickFormat(NumberFormat format)
      Sets the plot's y-axis tick format.
      Parameters:
      format - The tick format to be set
      Returns:
      Reference to this builder instance for method chaining
    • backgroundColor

      T backgroundColor(Paint color)
      Sets the plot background color to use when building the plot.
      Parameters:
      color - The color to set
      Returns:
      Reference to this builder instance for method chaining
    • axisFontColor

      T axisFontColor(Paint color)
      Sets the axis font color to use when building the plot.
      Parameters:
      color - The color to set
      Returns:
      Reference to this builder instance for method chaining
    • axisColor

      T axisColor(Paint color)
      Sets the axis color to use when building the plot.
      Parameters:
      color - The color to set
      Returns:
      Reference to this builder instance for method chaining
    • gridLines

      @Deprecated T gridLines()
      Deprecated.
      This facility is replaced by majorGrid(boolean) and minorGrid(boolean), and will be removed in a future release.

      For removal since v1.5.7

      Sets displaying grid lines ON.
      Returns:
      Reference to this builder instance for method chaining
    • noGridLines

      T noGridLines()
      Sets displaying all grid lines OFF. Shorthand for calling both majorGrid(boolean) and minorGrid(boolean) with a value of false.
      Returns:
      Reference to this builder instance for method chaining
    • majorGrid

      T majorGrid(boolean enabled)
      Toggles displaying major grid lines ON or OFF.
      Parameters:
      enabled - True to show major grid lines, false to turn them off.
      Returns:
      Reference to this builder instance for method chaining
    • majorGridColor

      T majorGridColor(Paint color)
      Sets the major grid color to use when building the plot.
      Parameters:
      color - The color to set
      Returns:
      Reference to this builder instance for method chaining
    • majorGridStyle

      T majorGridStyle(Stroke style)
      Sets the major grid line style to use when building the plot.
      Parameters:
      style - The style to set
      Returns:
      Reference to this builder instance for method chaining
    • minorGrid

      T minorGrid(boolean enabled)
      Toggles displaying minor grid lines ON or OFF.
      Parameters:
      enabled - True to show minor grid lines, false to turn them off.
      Returns:
      Reference to this builder instance for method chaining
    • minorGridColor

      T minorGridColor(Paint color)
      Sets the minor grid color to use when building the plot.
      Parameters:
      color - The color to set
      Returns:
      Reference to this builder instance for method chaining
    • minorGridStyle

      T minorGridStyle(Stroke style)
      Sets the minor grid line style to use when building the plot.
      Parameters:
      style - The style to set
      Returns:
      Reference to this builder instance for method chaining
    • build

      org.jfree.chart.plot.XYPlot build() throws IllegalStateException
      Builds the XYPlot from all configured data and properties.
      Returns:
      New instance of an XYPlot corresponding to all configured data and properties
      Throws:
      IllegalStateException - If the minimum needed configuration for building an XYPlot is not setup in the builder.