Package de.gsi.chart.renderer.spi
Class AbstractErrorDataSetRendererParameter<R extends AbstractErrorDataSetRendererParameter<R>>
- java.lang.Object
-
- de.gsi.chart.renderer.spi.AbstractDataSetManagement<R>
-
- de.gsi.chart.renderer.spi.AbstractErrorDataSetRendererParameter<R>
-
- Type Parameters:
R- generic object type for renderer parameter
- All Implemented Interfaces:
Renderer
- Direct Known Subclasses:
ErrorDataSetRenderer
public abstract class AbstractErrorDataSetRendererParameter<R extends AbstractErrorDataSetRendererParameter<R>> extends AbstractDataSetManagement<R>
simple class to move the various parameters out of the class containing the algorithms uses the shadow field pattern to minimise memory usage (lots of boiler-plate code ... sorry)- Author:
- rstein
-
-
Field Summary
Fields Modifier and Type Field Description protected static doubleDEFAULT_HISTORY_INTENSITY_FADING-
Fields inherited from class de.gsi.chart.renderer.spi.AbstractDataSetManagement
showInLegend
-
-
Constructor Summary
Constructors Constructor Description AbstractErrorDataSetRendererParameter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ReadOnlyBooleanPropertyactualPointReductionProperty()Indicates whether point reduction is active.javafx.beans.property.BooleanPropertyallowNaNsProperty()javafx.beans.property.BooleanPropertyassumeSortedDataProperty()Disable this if you have data which is not monotonic in x-direction.javafx.beans.property.DoublePropertybarWidthPercentageProperty()javafx.beans.property.IntegerPropertybarWidthProperty()protected Rbind(R other)javafx.beans.property.IntegerPropertydashSizeProperty()javafx.beans.property.BooleanPropertydrawBarsProperty()javafx.beans.property.BooleanPropertydrawBubblesProperty()javafx.beans.property.BooleanPropertydrawMarkerProperty()javafx.beans.property.BooleanPropertydynamicBarWidthProperty()javafx.beans.property.ObjectProperty<ErrorStyle>errorStyleProperty()sets the error bar/surface plotting style ErrorBarRenderer.ESTYLE_NONE: no errors are drawn ErrorBarRenderer.ESTYLE_BAR: error bars are drawn (default) ErrorBarRenderer.ESTYLE_SURFACE: error surface is drawnintgetBarWidth()doublegetBarWidthPercentage()intgetDashSize()Returns thedashSize.ErrorStylegetErrorType()doublegetIntensityFading()Returns theintensityFading.doublegetMarkerSize()Returns themarkerSize.intgetMinRequiredReductionSize()LineStylegetPolyLineStyle()whether renderer should draw no, simple (point-to-point), stair-case, Bezier, ...RendererDataReducergetRendererDataReducer()intgetShiftBarOffset()Returns theshiftBarOffset.protected abstract RgetThis()javafx.beans.property.DoublePropertyintensityFadingProperty()booleanisActualReducePoints()Indicates whether point reduction is active.booleanisallowNaNs()booleanisAssumeSortedData()Disable this if you have data which is not monotonic in x-direction.booleanisDrawBars()booleanisDrawBubbles()booleanisDrawMarker()booleanisDynamicBarWidth()booleanisParallelImplementation()whether renderer should aim at parallelising sub-functionalitiesbooleanisReducePoints()Sets whether superfluous points, otherwise drawn on the same pixel area, are merged and represented by the multiple point average.booleanisShiftBar()javafx.beans.property.DoublePropertymarkerSizeProperty()javafx.beans.property.IntegerPropertyminRequiredReductionSizeProperty()javafx.beans.property.BooleanPropertyparallelImplementationProperty()Sets whether renderer should aim at parallelising sub-functionalitiesjavafx.beans.property.BooleanPropertypointReductionProperty()Sets whether superfluous points, otherwise drawn on the same pixel area, are merged and represented by the multiple point average.javafx.beans.property.ObjectProperty<LineStyle>polyLineStyleProperty()Sets whether renderer should draw no, simple (point-to-point), stair-case, Bezier, ...javafx.beans.property.ObjectProperty<RendererDataReducer>rendererDataReducerProperty()sets the data reduction algorithm: possibly implementations are
DefaultDataReducer(default)MaxDataReducer(a simple down-sampling algorithm, returning fixed number of max.RsetAllowNaNs(boolean state)RsetAssumeSortedData(boolean state)Disable this if you have data which is not monotonic in x-direction.RsetBarWidth(int barWidth)RsetBarWidthPercentage(double size)RsetDashSize(int dashSize)Sets thedashSizeto the specified value.RsetDrawBars(boolean state)RsetDrawBubbles(boolean state)RsetDrawMarker(boolean state)RsetDynamicBarWidth(boolean state)RsetErrorType(ErrorStyle style)sets the error bar/surface plotting style ErrorBarRenderer.ESTYLE_NONE: no errors are drawn ErrorBarRenderer.ESTYLE_BAR: error bars are drawn (default) ErrorBarRenderer.ESTYLE_SURFACE: error surface is drawnRsetIntensityFading(double size)Sets theintensityFadingto the specified value.RsetMarkerSize(double size)Sets themarkerSizeto the specified value.RsetMinRequiredReductionSize(int size)RsetParallelImplementation(boolean state)Sets whether renderer should aim at parallelising sub-functionalitiesRsetPointReduction(boolean state)Sets whether superfluous points, otherwise drawn on the same pixel area, are merged and represented by the multiple point average.RsetPolyLineStyle(LineStyle style)Sets whether renderer should draw no, simple (point-to-point), stair-case, Bezier, ...RsetRendererDataReducer(RendererDataReducer algorithm)RsetShiftBar(boolean state)RsetshiftBarOffset(int shiftBarOffset)Sets theshiftBarOffsetto the specified value.javafx.beans.property.IntegerPropertyshiftBarOffsetProperty()javafx.beans.property.BooleanPropertyshiftBarProperty()protected Runbind()-
Methods inherited from class de.gsi.chart.renderer.spi.AbstractDataSetManagement
copyMetaData, getAxes, getDataSetCopy, getDatasets, getDatasetsCopy, getDatasetsCopy, getErrorDataSetCopy, getFirstAxis, setShowInLegend, showInLegend, showInLegendProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.gsi.chart.renderer.Renderer
drawLegendSymbol, render
-
-
-
-
Field Detail
-
DEFAULT_HISTORY_INTENSITY_FADING
protected static final double DEFAULT_HISTORY_INTENSITY_FADING
- See Also:
- Constant Field Values
-
-
Method Detail
-
actualPointReductionProperty
public javafx.beans.property.ReadOnlyBooleanProperty actualPointReductionProperty()
Indicates whether point reduction is active.- Returns:
- true if data points are supposed to be reduced
-
allowNaNsProperty
public javafx.beans.property.BooleanProperty allowNaNsProperty()
- Returns:
- the drawBubbles property
-
assumeSortedDataProperty
public javafx.beans.property.BooleanProperty assumeSortedDataProperty()
Disable this if you have data which is not monotonic in x-direction. This setting can increase rendering time drastically because lots of off screen points might have to be rendered.- Returns:
- true if data points are supposed to be sorted
-
barWidthPercentageProperty
public javafx.beans.property.DoubleProperty barWidthPercentageProperty()
-
barWidthProperty
public javafx.beans.property.IntegerProperty barWidthProperty()
-
dashSizeProperty
public javafx.beans.property.IntegerProperty dashSizeProperty()
-
drawBarsProperty
public javafx.beans.property.BooleanProperty drawBarsProperty()
- Returns:
- the drawBars state
-
drawBubblesProperty
public javafx.beans.property.BooleanProperty drawBubblesProperty()
- Returns:
- the drawBubbles property
-
drawMarkerProperty
public javafx.beans.property.BooleanProperty drawMarkerProperty()
- Returns:
- the drawMarker state
-
dynamicBarWidthProperty
public javafx.beans.property.BooleanProperty dynamicBarWidthProperty()
- Returns:
- the dynamicBarWidth state
-
errorStyleProperty
public javafx.beans.property.ObjectProperty<ErrorStyle> errorStyleProperty()
sets the error bar/surface plotting style ErrorBarRenderer.ESTYLE_NONE: no errors are drawn ErrorBarRenderer.ESTYLE_BAR: error bars are drawn (default) ErrorBarRenderer.ESTYLE_SURFACE: error surface is drawn- Returns:
- the errorStyle
-
getBarWidth
public int getBarWidth()
- Returns:
- the
barWidthin case of constant width bards being drawn @see setDynamicBarWidth()
-
getBarWidthPercentage
public double getBarWidthPercentage()
- Returns:
- the
barWidthPercentageof the total X space should be taken to paint // bars.
-
getDashSize
public int getDashSize()
Returns thedashSize.- Returns:
- the
dashSize.
-
getErrorType
public ErrorStyle getErrorType()
- Returns:
- returns error plotting style
- See Also:
for details
-
getIntensityFading
public double getIntensityFading()
Returns theintensityFading.- Returns:
- the
intensityFading.
-
getMarkerSize
public double getMarkerSize()
Returns themarkerSize.- Returns:
- the
markerSize.
-
getMinRequiredReductionSize
public int getMinRequiredReductionSize()
- Returns:
- the minimum number of samples before performing data reduction
-
getPolyLineStyle
public LineStyle getPolyLineStyle()
whether renderer should draw no, simple (point-to-point), stair-case, Bezier, ... lines- Returns:
- LineStyle
-
getRendererDataReducer
public RendererDataReducer getRendererDataReducer()
- Returns:
- the active data set reducer algorithm
- See Also:
rendererDataReducerProperty()
-
getShiftBarOffset
public int getShiftBarOffset()
Returns theshiftBarOffset.- Returns:
- the
shiftBarOffset.
-
getThis
protected abstract R getThis()
- Specified by:
getThisin classAbstractDataSetManagement<R extends AbstractErrorDataSetRendererParameter<R>>- Returns:
- the instance of this AbstractErrorDataSetRendererParameter.
-
intensityFadingProperty
public javafx.beans.property.DoubleProperty intensityFadingProperty()
-
isActualReducePoints
public boolean isActualReducePoints()
Indicates whether point reduction is active.- Returns:
- true if point reduction is on (default) else false.
-
isallowNaNs
public boolean isallowNaNs()
- Returns:
- true if NaN values are permitted
-
isAssumeSortedData
public boolean isAssumeSortedData()
Disable this if you have data which is not monotonic in x-direction. This setting can increase rendering time drastically because lots of off screen points might have to be rendered.- Returns:
- true if points should be assumed to be sorted (default)
-
isDrawBars
public boolean isDrawBars()
- Returns:
- true if bars from the data points to the y==0 axis shall be drawn
-
isDrawBubbles
public boolean isDrawBubbles()
- Returns:
- true if bubbles shall be draw
-
isDrawMarker
public boolean isDrawMarker()
- Returns:
- true if point reduction is on (default) else false.
-
isDynamicBarWidth
public boolean isDynamicBarWidth()
- Returns:
- true whether the width of bars drawn to the '0' shall be dynamically to the shown axis width
-
isParallelImplementation
public boolean isParallelImplementation()
whether renderer should aim at parallelising sub-functionalities- Returns:
- true if renderer is parallelising sub-functionalities
-
isReducePoints
public boolean isReducePoints()
Sets whether superfluous points, otherwise drawn on the same pixel area, are merged and represented by the multiple point average. Note that the point Reduction is also disabled implicitly by assumeSortedData = false, check the read only actualDataPointReduction Property.- Returns:
- true if point reduction is on (default) else false.
-
isShiftBar
public boolean isShiftBar()
- Returns:
- true if bars drawn to the y==0 axis shall be horizontally shifted for each DataSet
-
markerSizeProperty
public javafx.beans.property.DoubleProperty markerSizeProperty()
-
minRequiredReductionSizeProperty
public javafx.beans.property.IntegerProperty minRequiredReductionSizeProperty()
-
parallelImplementationProperty
public javafx.beans.property.BooleanProperty parallelImplementationProperty()
Sets whether renderer should aim at parallelising sub-functionalities- Returns:
- true if data points are supposed to be reduced
-
pointReductionProperty
public javafx.beans.property.BooleanProperty pointReductionProperty()
Sets whether superfluous points, otherwise drawn on the same pixel area, are merged and represented by the multiple point average.- Returns:
- true if data points are supposed to be reduced
-
polyLineStyleProperty
public javafx.beans.property.ObjectProperty<LineStyle> polyLineStyleProperty()
Sets whether renderer should draw no, simple (point-to-point), stair-case, Bezier, ... lines- Returns:
- property
-
rendererDataReducerProperty
public javafx.beans.property.ObjectProperty<RendererDataReducer> rendererDataReducerProperty()
sets the data reduction algorithm: possibly implementations are
DefaultDataReducer(default)MaxDataReducer(a simple down-sampling algorithm, returning fixed number of max. 1000 points)RamanDouglasPeukerDataReducerDouglasPeukerDataReducerVisvalingamMaheswariWhyattDataReducer(being developed)
- Returns:
- the rendererDataReducerProperty
-
setAllowNaNs
public R setAllowNaNs(boolean state)
- Parameters:
state- true if NaN values are permitted- Returns:
- itself (fluent design)
-
setAssumeSortedData
public R setAssumeSortedData(boolean state)
Disable this if you have data which is not monotonic in x-direction. This setting can increase rendering time drastically because lots of off screen points might have to be rendered.- Parameters:
state- true if data points are supposed to be sorted- Returns:
- itself (fluent design)
-
setBarWidth
public R setBarWidth(int barWidth)
- Parameters:
barWidth- thebarWidthin case of constant width bards being drawn @see setDynamicBarWidth()- Returns:
- itself (fluent design)
-
setBarWidthPercentage
public R setBarWidthPercentage(double size)
- Parameters:
size- thebarWidthPercentageof the total X space should be taken to paint- Returns:
- itself (fluent design)
-
setDashSize
public R setDashSize(int dashSize)
Sets thedashSizeto the specified value. The dash is the horizontal line painted at the ends of the vertical line. It is not painted if set to 0.- Parameters:
dashSize- thedashSizeto set.- Returns:
- itself (fluent design)
-
setDrawBars
public R setDrawBars(boolean state)
- Parameters:
state- true if bars from the data points to the y==0 axis shall be drawn- Returns:
- itself (fluent design)
-
setDrawBubbles
public R setDrawBubbles(boolean state)
- Parameters:
state- true if bubbles shall be draw- Returns:
- itself (fluent design)
-
setDrawMarker
public R setDrawMarker(boolean state)
- Parameters:
state- true -> draws markers- Returns:
- itself (fluent design)
-
setDynamicBarWidth
public R setDynamicBarWidth(boolean state)
- Parameters:
state- true whether the width of bars drawn to the '0' shall be dynamically to the shown axis width- Returns:
- itself (fluent design)
-
setErrorType
public R setErrorType(ErrorStyle style)
sets the error bar/surface plotting style ErrorBarRenderer.ESTYLE_NONE: no errors are drawn ErrorBarRenderer.ESTYLE_BAR: error bars are drawn (default) ErrorBarRenderer.ESTYLE_SURFACE: error surface is drawn- Parameters:
style- ErrorStyle @see ErrorStyle enum- Returns:
- itself (fluent design)
-
setIntensityFading
public R setIntensityFading(double size)
Sets theintensityFadingto the specified value.- Parameters:
size- theintensityFadingto set.- Returns:
- itself (fluent design)
-
setMarkerSize
public R setMarkerSize(double size)
Sets themarkerSizeto the specified value.- Parameters:
size- themarkerSizeto set.- Returns:
- itself (fluent design)
-
setMinRequiredReductionSize
public R setMinRequiredReductionSize(int size)
- Parameters:
size- the minimum number of samples before performing data reduction- Returns:
- itself (fluent design)
-
setParallelImplementation
public R setParallelImplementation(boolean state)
Sets whether renderer should aim at parallelising sub-functionalities- Parameters:
state- true if renderer is parallelising sub-functionalities- Returns:
- itself (fluent design)
-
setPointReduction
public R setPointReduction(boolean state)
Sets whether superfluous points, otherwise drawn on the same pixel area, are merged and represented by the multiple point average.- Parameters:
state- true if data points are supposed to be reduced- Returns:
- itself (fluent design)
-
setPolyLineStyle
public R setPolyLineStyle(LineStyle style)
Sets whether renderer should draw no, simple (point-to-point), stair-case, Bezier, ... lines- Parameters:
style- draw no, simple (point-to-point), stair-case, Bezier, ... lines- Returns:
- itself (fluent design)
-
setRendererDataReducer
public R setRendererDataReducer(RendererDataReducer algorithm)
- Parameters:
algorithm- the new data reducing algorithm to be set (null ->DefaultDataReducer)- Returns:
- itself (fluent design)
- See Also:
rendererDataReducerProperty()
-
setShiftBar
public R setShiftBar(boolean state)
- Parameters:
state- true if bars drawn to the y==0 axis shall be horizontally shifted for each DataSet- Returns:
- itself (fluent design)
-
setshiftBarOffset
public R setshiftBarOffset(int shiftBarOffset)
Sets theshiftBarOffsetto the specified value.- Parameters:
shiftBarOffset- theshiftBarOffsetto set.- Returns:
- itself (fluent design)
-
shiftBarOffsetProperty
public javafx.beans.property.IntegerProperty shiftBarOffsetProperty()
-
shiftBarProperty
public javafx.beans.property.BooleanProperty shiftBarProperty()
- Returns:
- the shiftBar state
-
unbind
protected R unbind()
-
-