Package com.jfcbuilder.builders
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 TypeMethodDescriptionannotation
(IXYAnnotationBuilder<?> annotation) Registers an IXYAnnotationBuilder whosebuild()
method will be called to generate its XYAnnotation when this plot builder'sbuild()
method is called.Sets the axis color to use when building the plot.axisFontColor
(Paint color) Sets the axis font color to use when building the plot.backgroundColor
(Paint color) Sets the plot background color to use when building the plot.org.jfree.chart.plot.XYPlot
build()
Builds the XYPlot from all configured data and properties.Deprecated.indexRange
(ZeroBasedIndexRange indexRange) 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.majorGridColor
(Paint color) Sets the major grid color to use when building the plot.majorGridStyle
(Stroke style) Sets the major grid line style to use when building the plot.marker
(MarkerBuilder marker) Registers aMarkerBuilder
whosebuild()
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.minorGridColor
(Paint color) Sets the minor grid color to use when building the plot.minorGridStyle
(Stroke style) 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.series
(IXYTimeSeriesBuilder<?> series) Registers an IXYTimeSeriesBuilder whosebuild()
method will be called to generate its XYTimeSeries when this plot builder'sbuild()
method is called.series
(IXYTimeSeriesDatasetBuilder<?> series) Registers an IXYDatasetBuilder whosebuild()
method will be called to generate its XYDataset when this plot builder'sbuild()
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.yTickFormat
(NumberFormat format) Sets the plot's y-axis tick format.
-
Method Details
-
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
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
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
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
Registers an IXYTimeSeriesBuilder whosebuild()
method will be called to generate its XYTimeSeries when this plot builder'sbuild()
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
Registers an IXYDatasetBuilder whosebuild()
method will be called to generate its XYDataset when this plot builder'sbuild()
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
Registers aMarkerBuilder
whosebuild()
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
Registers an IXYAnnotationBuilder whosebuild()
method will be called to generate its XYAnnotation when this plot builder'sbuild()
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
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
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
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 setupper
- 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
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
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
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
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
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.This facility is replaced bymajorGrid(boolean)
andminorGrid(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 bothmajorGrid(boolean)
andminorGrid(boolean)
with a value offalse
.- Returns:
- Reference to this builder instance for method chaining
-
majorGrid
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
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
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
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
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
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
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.
-
majorGrid(boolean)
andminorGrid(boolean)
, and will be removed in a future release.