Package com.jfcbuilder.builders
Interface IXYAnnotationBuilder<T extends IXYAnnotationBuilder<T>>
- Type Parameters:
T
- The method chaining return type, which must be the type of the builder implementing this interface.
- All Known Implementing Classes:
XYArrowBuilder
,XYBoxBuilder
,XYDataImageBuilder
,XYDrawableBuilder
,XYImageBuilder
,XYLineBuilder
,XYPolygonBuilder
,XYShapeBuilder
,XYTextBuilder
,XYTitleBuilder
public interface IXYAnnotationBuilder<T extends IXYAnnotationBuilder<T>>
Interface for all XYAnnotation 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 TypeMethodDescriptionorg.jfree.chart.annotations.XYAnnotation
build()
Builds the XYAnnotation from all configured data and properties.void
mapXToTimeIndex
(long[] timeData, int indexRangeStartIndex, int indexRangeEndIndex) Helper mutation method for replacing the configured x-axis date values with corresponding source array element index value.
-
Method Details
-
build
Builds the XYAnnotation from all configured data and properties.- Returns:
- New instance of an XYAnnotation corresponding to all configured data and properties
- Throws:
IllegalStateException
- If the builder is missing properties whenbuild()
is called
-
mapXToTimeIndex
void mapXToTimeIndex(long[] timeData, int indexRangeStartIndex, int indexRangeEndIndex) Helper mutation method for replacing the configured x-axis date values with corresponding source array element index value.Meant to be called internally by the framework itself, not by framework clients.
For facilitating the removal of visible time gaps on charts.
Different implementations may use different methods to map configured x value(s) to numeric indices, including search algorithms that may have higher order Big-O complexity.
- Parameters:
timeData
- The array of source time valuesindexRangeStartIndex
- The start index of the series index rangeindexRangeEndIndex
- The end index of the series index range
-