Class Trace2DDebugger
- All Implemented Interfaces:
ITrace2D,PropertyChangeListener,Serializable,Comparable<ITrace2D>,EventListener
Use it by decorating the ITrace2D you normally use:
// Create a chart:
Chart2D chart = new Chart2D();
// Create an ITrace:
<b>ITrace2D trace = new Trace2DDebugger(new Trace2DSimple());
// add data...
...
//
chart.addTrace(trace);
One can use setXRange(Range),setYRange(Range) to let this
instance throw an Exception if bounds for legal data are exceeded.
- Version:
- $Revision: 1.34 $
- Author:
- Achim Westermann
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface info.monitorenter.gui.chart.ITrace2D
ITrace2D.DistancePoint -
Field Summary
Fields inherited from interface info.monitorenter.gui.chart.ITrace2D
PROPERTY_COLOR, PROPERTY_ERRORBARPOLICY, PROPERTY_ERRORBARPOLICY_CONFIGURATION, PROPERTY_LABEL, PROPERTY_MAX_X, PROPERTY_MAX_Y, PROPERTY_MIN_X, PROPERTY_MIN_Y, PROPERTY_NAME, PROPERTY_PAINTERS, PROPERTY_PHYSICALUNITS, PROPERTY_POINT_CHANGED, PROPERTY_POINT_HIGHLIGHTERS_CHANGED, PROPERTY_STROKE, PROPERTY_TRACEPOINT, PROPERTY_VISIBLE, PROPERTY_ZINDEX, Z_INDEX_MIN, ZINDEX_MAX -
Constructor Summary
ConstructorsConstructorDescriptionTrace2DDebugger(ITrace2D debug) Creates an instance to debug the given trace for valid points added. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComputingTrace(ITrace2D trace) Adds a trace that "should" compute values from the points added via.ITrace2D.addPoint(ITracePoint2D)booleanaddErrorBarPolicy(IErrorBarPolicy<?> errorBarPolicy) Adds the given error bar policy to the internal set of error bar policies.booleanaddPoint(double x, double y) Adds a trace point to the internal data.booleanAdds the givenTracePoint2Dto the internal data.booleanaddPointHighlighter(IPointPainter<?> highlighter) Adds the given point painter to the internal set of point highlighters.voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Registers a property change listener that will be informed about changes of the property identified by the givenpropertyName.booleanaddTracePainter(ITracePainter<?> painter) Adds the given trace painter to the internal set of trace painters.intbooleancontainsTracePainter(ITracePainter<?> painter) Returns true if the given painter is contained in this compound painter.voidfirePointChanged(ITracePoint2D changed, int state) Method to trigger by,TracePoint2D.setLocation(double, double)orITrace2D.addPoint(ITracePoint2D).ITrace2D.removePoint(ITracePoint2D)getColor()Because the color is data common to a trace of aChart2Dit is stored here.Set<IErrorBarPolicy<?>>Returns theSet<that will be used to render error bars for this trace.IErrorBarPolicy>booleanReturns true if this trace has error bars configured.getLabel()Callback method for theChart2Dthat returns aStringdescribing the label of theITrace2Dthat will be displayed below the drawing area of theChart2D.intReturns the maximum amount ofTracePoint2Dinstances that may be added.doublegetMaxX()Returns the maximum value to be displayed on the x- axis of theChart2D.doublegetMaxY()Returns the maximum value to be displayed on the y- axis of the Chart2D.doublegetMinX()Returns the minimum value to be displayed on the x- axis of the Chart2D.doublegetMinY()Returns the minimum value to be displayed on the y- axis of the Chart2D.getName()Returns the name of this trace.getNearestPointEuclid(double x, double y) Returns the nearest point to the given normalized value coordinates of this trace in Euclid distance.getNearestPointManhattan(double x, double y) Returns the nearest point to the given normalized value coordinates of this trace in Manhattan distance.Returns the concatenation[x: ".ITrace2D.getPhysicalUnitsX()", y: "ITrace2D.getPhysicalUnitsY()"]Returns the physical unit string value for the x dimension.Returns the physical unit string value for the y dimension.Set<IPointPainter<?>>Returns theSet<that may be used to highlight points of this trace.IPointPainter>getPropertyChangeListeners(String property) Returns all property change listeners for the given property.intgetSize()Returns the amount ofTracePoint2Dinstances currently contained.Returns the Stroke that is used to render this instance.final Set<ITracePainter<?>>Returns theSet<that will be used to paint this trace.ITracePainter>Returns the range of valid points of the x axis.Returns the range of valid points of the y axis.The z-index defines the order in which this instance will be painted.booleanisEmpty()Returns false if internalinstances are contained or true if not.TracePoint2DbooleanReturns true if this instance should be rendered.iterator()Returns anIteratorover the internalinstances.TracePoint2DvoidSet<IPointPainter<?>>Clears all internal point highlighters used.voidRemoves all internalTracePoint2D.ITrace2D.isEmpty()will return true afterwards.booleanremoveComputingTrace(ITrace2D trace) Remove a trace that "should" compute values from the points added via.ITrace2D.addPoint(ITracePoint2D)booleanremoveErrorBarPolicy(IErrorBarPolicy<?> errorBarPolicy) Removes the given error bar policy from the internal set of error bar policies.booleanremovePoint(ITracePoint2D point) Removes the given point from this trace.booleanremovePointHighlighter(IPointPainter<?> highlighter) Removes the given point highlighter, if it's class is contained.voidUnregisters a property change listener that has been registered for listening on all properties.voidremovePropertyChangeListener(String property, PropertyChangeListener listener) Removes a property change listener for listening on the given property.booleanremoveTracePainter(ITracePainter<?> painter) Removes the given trace painter, if it's class is contained and if more painters are remaining.voidSet ajava.awt.Colorfor this trace.Set<IErrorBarPolicy<?>>setErrorBarPolicy(IErrorBarPolicy<?> errorBarPolicy) Replaces all internal error bar policies by the new one.voidAssingns a specific name to theITrace2Dwhich will be displayed by theChart2D.voidsetPhysicalUnits(String xunit, String yunit) Assigns a specific String representing the physical unit to theITrace2D(e.g.Set<IPointPainter<?>>setPointHighlighter(IPointPainter<?> highlighter) Replaces all internal point highlighters by the new one.voidsetRenderer(Chart2D renderer) This is a callback fromChart2D.addTrace(ITrace2D)and must not be invoked from elsewhere (needed for synchronization).voidAllows to specify the rendering of the ITrace2D.final Set<ITracePainter<?>>setTracePainter(ITracePainter<?> painter) Replaces all internal trace painters by the new one.voidsetVisible(boolean visible) Set the visibility.voidSet the valid range for x values.voidSet the valid range for y values.voidSets the internal z-index property.booleanTests whether error bars are painted by this trace.booleanTests whether error bars in negative x direction are painted by this trace.booleanTests whether error bars in negative y direction are painted by this trace.booleanTests whether error bars in positive x direction are painted by this trace.booleanTests whether error bars in positive y direction are painted by this trace.toString()
-
Constructor Details
-
Trace2DDebugger
Creates an instance to debug the given trace for valid points added.- Parameters:
debug- the trace to debug.
-
-
Method Details
-
addComputingTrace
Description copied from interface:ITrace2DAdds a trace that "should" compute values from the points added via.ITrace2D.addPoint(ITracePoint2D)The given trace will be informed in case an add operation on this trace succeeds via
.ITrace2D.addPoint(ITracePoint2D)- Specified by:
addComputingTracein interfaceITrace2D- Parameters:
trace- the trace that will calculate it's points from the added points of this trace.- See Also:
-
addErrorBarPolicy
Description copied from interface:ITrace2DAdds the given error bar policy to the internal set of error bar policies.It will be the last error bar policy to render (most forward on screen).
- Specified by:
addErrorBarPolicyin interfaceITrace2D- Parameters:
errorBarPolicy- the error bar policy to add for rendering this trace's error bars.- Returns:
- true if the painter was added (same instance was not contained before).
- See Also:
-
addPoint
public boolean addPoint(double x, double y) Description copied from interface:ITrace2DAdds a trace point to the internal data.Warning:
Do not call this method before this trace has been added to a chart or you will not succeed as the chart is needed to get the proper.Chart2D.getTracePointProvider() -
addPoint
Description copied from interface:ITrace2DAdds the givenTracePoint2Dto the internal data.Try to pass instances of
TracePoint2Dto this instance instead of invokingto increase performance. Else the given point has to be copied into such an instance from the other method and delegated to this method.ITrace2D.addPoint(double, double)Implementations decide whether the point will be accepted or not. So they have to update the internal properties
minX,maxX,maxYandminYand also care about firing property change events for those properties by method.PropertyChangeSupport.firePropertyChange(java.beans.PropertyChangeEvent) -
addPointHighlighter
Description copied from interface:ITrace2DAdds the given point painter to the internal set of point highlighters.It will be the last point painter to paint highlighting if highlighting is active.
- Specified by:
addPointHighlighterin interfaceITrace2D- Parameters:
highlighter- the highlighter to add for highlighting this trace.- Returns:
- true if the highlighter was added (class of instance not contained before).
-
addPropertyChangeListener
Description copied from interface:ITrace2DRegisters a property change listener that will be informed about changes of the property identified by the givenpropertyName.- Specified by:
addPropertyChangeListenerin interfaceITrace2D- Parameters:
propertyName- the name of the property the listener is interested inlistener- a listener that will only be informed if the property identified by the argumentpropertyNamechanges- See Also:
-
addTracePainter
Description copied from interface:ITrace2DAdds the given trace painter to the internal set of trace painters.It will be the last painter to paint (most forward).
- Specified by:
addTracePainterin interfaceITrace2D- Parameters:
painter- the painter to add for rendering this trace.- Returns:
- true if the painter was added (class of instance not contained before).
- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<ITrace2D>- Parameters:
o- the trace to compare to.- Returns:
- see interface.
- See Also:
-
containsTracePainter
Description copied from interface:ITrace2DReturns true if the given painter is contained in this compound painter.- Specified by:
containsTracePainterin interfaceITrace2D- Parameters:
painter- the painter to check whether it is contained.- Returns:
- true if the given painter is contained in this compound painter.
- See Also:
-
firePointChanged
Description copied from interface:ITrace2DMethod to trigger by,TracePoint2D.setLocation(double, double)orITrace2D.addPoint(ITracePoint2D).ITrace2D.removePoint(ITracePoint2D)Bound checks are performed and property change events for the properties
,ITrace2D.PROPERTY_MAX_X,ITrace2D.PROPERTY_MIN_XandITrace2D.PROPERTY_MAX_Yare fired if the add bounds have changed due to the modification of the point.ITrace2D.PROPERTY_MIN_Y- Specified by:
firePointChangedin interfaceITrace2D- Parameters:
changed- the point that has been changed which may be a newly added point (from, a removed one or a modified one.ITrace2D.addPoint(ITracePoint2D)state- one of {to inform about the type of change.ITracePoint2D.STATE_ADDED,ITracePoint2D.STATE_CHANGED,ITracePoint2D.STATE_REMOVED- See Also:
-
getColor
Description copied from interface:ITrace2DBecause the color is data common to a trace of aChart2Dit is stored here.On the other hand only the corresponding
Chart2Dmay detect the same color chosen for differentIChart2Dinstances to be displayed. Therefore it is allowed to return null. This is a message to theChart2Dto leave it the choice of the color. Then theChart2Dwill chose a color not owned by anotherITrace2Dinstance managed and assign it to the null- returning instance.The
Chart2Dwill often call this method. So try to cache the value in implementation and only check on modifications ofTracePointinstances or onadd- invocations for changes. -
getErrorBarPolicies
Description copied from interface:ITrace2DReturns theSet<that will be used to render error bars for this trace.IErrorBarPolicy>- Specified by:
getErrorBarPoliciesin interfaceITrace2D- Returns:
- the
Set<that will be used to render error bars for this trace.IErrorBarPolicy> - See Also:
-
getHasErrorBars
public boolean getHasErrorBars()Description copied from interface:ITrace2DReturns true if this trace has error bars configured.If this returns false, no error bars will be painted for this trace.
- Specified by:
getHasErrorBarsin interfaceITrace2D- Returns:
- true if this trace has error bars configured.
- See Also:
-
getLabel
Description copied from interface:ITrace2DCallback method for theChart2Dthat returns aStringdescribing the label of theITrace2Dthat will be displayed below the drawing area of theChart2D.This method should be implemented and finalized ASAP in the inheritance tree and rely on the property
nameandphysicalUnits. -
getMaxSize
public int getMaxSize()Description copied from interface:ITrace2DReturns the maximum amount of
TracePoint2Dinstances that may be added. For implementations that limit the maximum amount this is a reasonable amount. Non-limiting implementations should returnInteger.MAX_VALUE. This allows to detect the unlimitedness. Of course no implementation could store that amount of points.- Specified by:
getMaxSizein interfaceITrace2D- Returns:
- The maximum amount of
TracePoint2Dinstances that may be added. - See Also:
-
getMaxX
public double getMaxX()Description copied from interface:ITrace2DReturns the maximum value to be displayed on the x- axis of theChart2D. Implementations should be synchronized for multithreaded use. No exception is thrown. In case of empty data (no tracepoints) 0 should be returned, to let the Chart2D know.The
Chart2Dwill often call this method. So try to cache the value in implementation and only check on modifications ofTracePointinstances or onadd- invocations for changes. -
getMaxY
public double getMaxY()Description copied from interface:ITrace2DReturns the maximum value to be displayed on the y- axis of the Chart2D. Implementations should be synchronized for multithreaded use. No exception is thrown. In case of empty data (no tracepoints) 0 should be returned. (watch division with zero). -
getMinX
public double getMinX()Description copied from interface:ITrace2DReturns the minimum value to be displayed on the x- axis of the Chart2D.Implementations should be synchronized for multithreaded use. No exception is thrown. In case of empty data (no tracepoints) 0 should be returned. (watch division with zero).
The
Chart2Dwill often call this method. So try to cache the value in implementation and only check on modifications ofTracePointinstances or onadd- invocations for changes. -
getMinY
public double getMinY()Description copied from interface:ITrace2DReturns the minimum value to be displayed on the y- axis of the Chart2D.Implementations should be synchronized for multithreaded use. No exception is thrown. In case of empty data (no tracepoints) 0 should be returned. (watch division with zero).
The
Chart2Dwill often call this method. So try to cache the value in implementation and only check on modifications ofTracePointinstances or onadd- invocations for changes. -
getName
Description copied from interface:ITrace2DReturns the name of this trace. -
getNearestPointEuclid
Description copied from interface:ITrace2DReturns the nearest point to the given normalized value coordinates of this trace in Euclid distance.Please note that the arguments must be normalized value coordinates like provided by a
or the division of a pixel coordinate by the total pixel range of the chart.TracePoint2D.getScaledX()Using the Manhattan distance is much faster than Euclid distance as it only includes basic addition an absolute value for computation per point (vs. square root, addition and quadrature for Euclid distance). However the euclid distance spans a circle for the nearest points which is visually more normal for end users than the Manhattan distance which forms a rhombus and reaches far distances in only one dimension.
- Specified by:
getNearestPointEuclidin interfaceITrace2D- Parameters:
x- the x value as a normalized value between 0 and 1.0.y- the x value as a normalized value between 0 and 1.0.- Returns:
- the nearest point to the given normalized value coordinates of this trace in Euclid distance.
- See Also:
-
getNearestPointManhattan
Description copied from interface:ITrace2DReturns the nearest point to the given normalized value coordinates of this trace in Manhattan distance.Please note that the arguments must be normalized value coordinates like provided by a
or the division of a pixel coordinate by the total pixel range of the chart.TracePoint2D.getScaledX()Using the Manhattan distance is much faster than Euclid distance as it only includes basic addition an absolute value for computation per point (vs. square root, addition and quadrature for Euclid distance).
- Specified by:
getNearestPointManhattanin interfaceITrace2D- Parameters:
x- the x value as a normalized value between 0 and 1.0.y- the x value as a normalized value between 0 and 1.0.- Returns:
- the nearest point to the given normalized value coordinates of this trace in Manhattan distance.
- See Also:
-
getPhysicalUnits
Description copied from interface:ITrace2DReturns the concatenation[x: ".ITrace2D.getPhysicalUnitsX()", y: "ITrace2D.getPhysicalUnitsY()"]- Specified by:
getPhysicalUnitsin interfaceITrace2D- Returns:
- the concatenation
[x: ".ITrace2D.getPhysicalUnitsX()", y: "ITrace2D.getPhysicalUnitsY()"] - See Also:
-
getPhysicalUnitsX
Description copied from interface:ITrace2DReturns the physical unit string value for the x dimension.- Specified by:
getPhysicalUnitsXin interfaceITrace2D- Returns:
- the physical unit string value for the x dimension.
- See Also:
-
getPhysicalUnitsY
Description copied from interface:ITrace2DReturns the physical unit string value for the y dimension.- Specified by:
getPhysicalUnitsYin interfaceITrace2D- Returns:
- the physical unit string value for the y dimension.
- See Also:
-
getPointHighlighters
Description copied from interface:ITrace2DReturns theSet<that may be used to highlight points of this trace.IPointPainter>This is used by the point highlighting feature:
Chart2D.enablePointHighlighting(boolean)- Specified by:
getPointHighlightersin interfaceITrace2D- Returns:
- the
Set<that may be used to highlight points.IPointPainter>
-
getPropertyChangeListeners
Description copied from interface:ITrace2DReturns all property change listeners for the given property.- Specified by:
getPropertyChangeListenersin interfaceITrace2D- Parameters:
property- one of the constants with thePROPERTY_prefix defined in this class or subclasses.- Returns:
- the property change listeners for the given property.
- See Also:
-
getRenderer
- Specified by:
getRendererin interfaceITrace2D- Returns:
- Returns the renderer.
- See Also:
-
getSize
public int getSize()Description copied from interface:ITrace2DReturns the amount ofTracePoint2Dinstances currently contained.- Specified by:
getSizein interfaceITrace2D- Returns:
- The amount of
instances currently contained.TracePoint2D - See Also:
-
getStroke
Description copied from interface:ITrace2DReturns the Stroke that is used to render this instance. -
getTracePainters
Description copied from interface:ITrace2DReturns theSet<that will be used to paint this trace.ITracePainter>The original set should be returned by contract to allow adding painters "silently" (vs. using
).ITrace2D.addTracePainter(ITracePainter)- Specified by:
getTracePaintersin interfaceITrace2D- Returns:
- the
Set<that will be used to paint this trace.ITracePainter> - See Also:
-
getXRange
Returns the range of valid points of the x axis.- Returns:
- the range of valid points of the x axis.
-
getYRange
Returns the range of valid points of the y axis.- Returns:
- the range of valid points of the y axis.
-
getZIndex
Description copied from interface:ITrace2DThe z-index defines the order in which this instance will be painted.A higher value will bring it more "to the front".
-
isEmpty
public boolean isEmpty()Description copied from interface:ITrace2DReturns false if internalinstances are contained or true if not.TracePoint2D- Specified by:
isEmptyin interfaceITrace2D- Returns:
- false if internal
instances are contained or true if not.TracePoint2D - See Also:
-
isVisible
public boolean isVisible()Description copied from interface:ITrace2DReturns true if this instance should be rendered. -
iterator
Description copied from interface:ITrace2DReturns anIteratorover the internalinstances.TracePoint2DImplementations should be synchronized. This method is meant to allow modifications of the intenal
TracePoint2Dinstances, so the original points should be returned.There is no guarantee that changes made to the contained tracepoints will be reflected in the display immediately. The order the iterator returns the
TracePoint2Dinstances decides how theChart2Dwill paint the trace.- Specified by:
iteratorin interfaceITrace2D- Returns:
- an
Iteratorover the internalinstances.TracePoint2D - See Also:
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener- See Also:
-
removeAllPointHighlighters
Description copied from interface:ITrace2DClears all internal point highlighters used.Returns the
Set<that was used to highlight points.IPointPainter>This is used by the point highlighting feature:
Chart2D.enablePointHighlighting(boolean)- Specified by:
removeAllPointHighlightersin interfaceITrace2D- Returns:
- the
Set<that was be used to highlight points.IPointPainter> - See Also:
-
removeAllPoints
public void removeAllPoints()Description copied from interface:ITrace2DRemoves all internalTracePoint2D.ITrace2D.isEmpty()will return true afterwards.- Specified by:
removeAllPointsin interfaceITrace2D- See Also:
-
removeComputingTrace
Description copied from interface:ITrace2DRemove a trace that "should" compute values from the points added via.ITrace2D.addPoint(ITracePoint2D)- Specified by:
removeComputingTracein interfaceITrace2D- Parameters:
trace- the trace that will calculate it's points from the added points of this trace.- Returns:
- true if the given trace was removed (recognized by the means of
).Object.equals(Object) - See Also:
-
removeErrorBarPolicy
Description copied from interface:ITrace2DRemoves the given error bar policy from the internal set of error bar policies.- Specified by:
removeErrorBarPolicyin interfaceITrace2D- Parameters:
errorBarPolicy- the error bar policy to remove.- Returns:
- true if the painter was removed (same instance contained before).
- See Also:
-
removePoint
Description copied from interface:ITrace2DRemoves the given point from this trace.- Specified by:
removePointin interfaceITrace2D- Parameters:
point- the point to remove.- Returns:
- true if the remove opertation was successful, false else.
- See Also:
-
removePointHighlighter
Description copied from interface:ITrace2DRemoves the given point highlighter, if it's class is contained.- Specified by:
removePointHighlighterin interfaceITrace2D- Parameters:
highlighter- the highlighter to remove.- Returns:
- true if a point highlighter of the class of the given argument was removed.
-
removePropertyChangeListener
Description copied from interface:ITrace2DUnregisters a property change listener that has been registered for listening on all properties.- Specified by:
removePropertyChangeListenerin interfaceITrace2D- Parameters:
listener- a listener that will only be informed if the property identified by the argumentpropertyNamechanges- See Also:
-
removePropertyChangeListener
Description copied from interface:ITrace2DRemoves a property change listener for listening on the given property.- Specified by:
removePropertyChangeListenerin interfaceITrace2D- Parameters:
property- one of the constants with thePROPERTY_prefix defined in this class or subclasses.listener- the listener for this property change.- See Also:
-
removeTracePainter
Description copied from interface:ITrace2DRemoves the given trace painter, if it's class is contained and if more painters are remaining.- Specified by:
removeTracePainterin interfaceITrace2D- Parameters:
painter- the trace painter to remove.- Returns:
- true if a trace painter of the class of the given argument was removed.
- See Also:
-
setColor
Description copied from interface:ITrace2DSet ajava.awt.Colorfor this trace. -
setErrorBarPolicy
Description copied from interface:ITrace2DReplaces all internal error bar policies by the new one.- Specified by:
setErrorBarPolicyin interfaceITrace2D- Parameters:
errorBarPolicy- the new sole painter to use.- Returns:
- the
Set<that was used before.IErrorBarPolicy> - See Also:
-
setName
Description copied from interface:ITrace2DAssingns a specific name to theITrace2Dwhich will be displayed by theChart2D. -
setPhysicalUnits
Description copied from interface:ITrace2DAssigns a specific String representing the physical unit to theITrace2D(e.g. Volt, Ohm, lux, ...) which will be displayed by theChart2D- Specified by:
setPhysicalUnitsin interfaceITrace2D- Parameters:
xunit- the physical unit for the x axis.yunit- the physical unit for the y axis.- See Also:
-
setPointHighlighter
Description copied from interface:ITrace2DReplaces all internal point highlighters by the new one.- Specified by:
setPointHighlighterin interfaceITrace2D- Parameters:
highlighter- the new sole highlighter to use.- Returns:
- the
Set<that was used before or null if nothing changed.IPointPainter>
-
setRenderer
Description copied from interface:ITrace2DThis is a callback fromChart2D.addTrace(ITrace2D)and must not be invoked from elsewhere (needed for synchronization).Not the best design to put this to an interface, but Char2D should handle this interface only.
- Specified by:
setRendererin interfaceITrace2D- Parameters:
renderer- The renderer to set.- See Also:
-
setStroke
Description copied from interface:ITrace2DAllows to specify the rendering of the ITrace2D. This Stroke will be assigned to theGraphics2Dby the renderingChart2Dwhen painting this instance. -
setTracePainter
Description copied from interface:ITrace2DReplaces all internal trace painters by the new one.- Specified by:
setTracePainterin interfaceITrace2D- Parameters:
painter- the new sole painter to use.- Returns:
- the
Set<that was used before.ITracePainter> - See Also:
-
setVisible
public void setVisible(boolean visible) Description copied from interface:ITrace2DSet the visibility. If argument is false, this instance will not be rendered by a Chart2D.- Specified by:
setVisiblein interfaceITrace2D- Parameters:
visible- true if this trace should be painted, false else.- See Also:
-
setXRange
Set the valid range for x values. If a point breaks these bounds anIllegalArgumentExceptionwill be thrown.- Parameters:
range- The xRange to set.
-
setYRange
Set the valid range for y values. If a point breaks these bounds anIllegalArgumentExceptionwill be thrown.- Parameters:
range- The yRange to set.
-
setZIndex
Description copied from interface:ITrace2DSets the internal z-index property. This decides the order in which different traces within the sameare painted.Chart2DThe higher the given value is the more this trace will be brought to front.
The value must not be lower than
ITrace2D.Z_INDEX_MIN(0) and higher thanITrace2D.ZINDEX_MAX(100).This might not be tested for increased performance but ignoring these bounds may result in wrong ordering of display.
-
showsErrorBars
public boolean showsErrorBars()Description copied from interface:ITrace2DTests whether error bars are painted by this trace.Returns true if
- this trace contains
IErrorBarPolicyinstances. - and at least one of these instances contains at least one
IErrorBarPainterinstance.
- Specified by:
showsErrorBarsin interfaceITrace2D- Returns:
- true if this trace renders error bars.
- See Also:
- this trace contains
-
showsNegativeXErrorBars
public boolean showsNegativeXErrorBars()Description copied from interface:ITrace2DTests whether error bars in negative x direction are painted by this trace.Returns true if
- this trace contains at leaste one
IErrorBarPolicyinstance thatIErrorBarPolicy.isShowNegativeXErrors(). - and at least one of these instances contains at least one
IErrorBarPainterinstance.
- Specified by:
showsNegativeXErrorBarsin interfaceITrace2D- Returns:
- true if this trace renders error bars in negative x direction.
- See Also:
- this trace contains at leaste one
-
showsNegativeYErrorBars
public boolean showsNegativeYErrorBars()Description copied from interface:ITrace2DTests whether error bars in negative y direction are painted by this trace.Returns true if
- this trace contains at leaste one
IErrorBarPolicyinstance thatIErrorBarPolicy.isShowNegativeYErrors(). - and at least one of these instances contains at least one
IErrorBarPainterinstance.
- Specified by:
showsNegativeYErrorBarsin interfaceITrace2D- Returns:
- true if this trace renders error bars in negative y direction.
- See Also:
- this trace contains at leaste one
-
showsPositiveXErrorBars
public boolean showsPositiveXErrorBars()Description copied from interface:ITrace2DTests whether error bars in positive x direction are painted by this trace.Returns true if
- this trace contains at leaste one
IErrorBarPolicyinstance thatIErrorBarPolicy.isShowPositiveXErrors(). - and at least one of these instances contains at least one
IErrorBarPainterinstance.
- Specified by:
showsPositiveXErrorBarsin interfaceITrace2D- Returns:
- true if this trace renders error bars in positive x direction.
- See Also:
- this trace contains at leaste one
-
showsPositiveYErrorBars
public boolean showsPositiveYErrorBars()Description copied from interface:ITrace2DTests whether error bars in positive y direction are painted by this trace.Returns true if
- this trace contains at leaste one
IErrorBarPolicyinstance thatIErrorBarPolicy.isShowPositiveYErrors(). - and at least one of these instances contains at least one
IErrorBarPainterinstance.
- Specified by:
showsPositiveYErrorBarsin interfaceITrace2D- Returns:
- true if this trace renders error bars in positive y direction.
- See Also:
- this trace contains at leaste one
-
toString
-