IErrorBarPolicy<AErrorBarPolicyConfigurable>, IPointPainter<AErrorBarPolicyConfigurable>, ITracePainter<AErrorBarPolicyConfigurable>, java.io.Serializable, java.lang.Comparable<AErrorBarPolicyConfigurable>public class ErrorBarPolicyRelative extends AErrorBarPolicyConfigurable
IErrorBarPolicy
that adds a relative error (relative to the absolute values) to the points to
render.
You should not use this if you have a small value range but very high values: The relative value will cause exteremely long lines (be much higher than the value range to display) and fold the trace to a minimum line.
m_lastPoint, m_lastX, m_lastY, m_propertyChangeSupportPROPERTY_CONFIGURATION, PROPERTY_ERRORBARPAINTER| Constructor | Description |
|---|---|
ErrorBarPolicyRelative(double relativeError) |
Creates an instance with the given relative errors.
|
ErrorBarPolicyRelative(double relativeXError,
double relativeYError) |
Creates an instance with the given relative errors.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
|
javax.swing.JComponent |
getCustomConfigurator() |
Allows an implementation to return a
JComponent that takes
care of custom configuration properties for the UI support of error bar
policies. |
double |
getRelativeXError() |
Returns the relative x error between 0 and 1.
|
double |
getRelativeYError() |
Returns the relative y error between 0 and 1.
|
double |
getXError(double xValue) |
Returns the relative x error (value domain) that is added to / subtracted
from the values to display.
|
double |
getYError(double yValue) |
Returns the relative y error (value domain) that is added to / subtracted
from the values to display.
|
int |
hashCode() |
|
protected int |
internalGetNegativeXError(int xPixel,
int yPixel,
ITracePoint2D original) |
Internally compute the negative x error for the given point as a pixel
value (not relative to the the origin value).
|
protected int |
internalGetNegativeYError(int xPixel,
int yPixel,
ITracePoint2D original) |
Internally compute the negative y error for the given point as a pixel
value (not relative to the the origin value).
|
protected int |
internalGetPositiveXError(int xPixel,
int yPixel,
ITracePoint2D original) |
Internally compute the positive x error in pixel for the given point as an
absolute value (not relative to the the origin value).
|
protected int |
internalGetPositiveYError(int xPixel,
int yPixel,
ITracePoint2D original) |
Internally compute the positive y error in pixel for the given point as an
absolute value (not relative to the the origin value).
|
void |
setRelativeXError(double relativeXError) |
Sets the relative X error to add to each error bar.
|
void |
setRelativeYError(double relativeYError) |
Sets the relative Y error to add to each error bar.
|
addErrorBarPainter, addPropertyChangeListener, calculateErrorBar, compareTo, discontinue, endPaintIteration, firePropertyChange, getErrorBarPainters, getTrace, isShowNegativeXErrors, isShowNegativeYErrors, isShowPositiveXErrors, isShowPositiveYErrors, paintPoint, propertyChange, removeErrorBarPainter, removePropertyChangeListener, removePropertyChangeListener, setErrorBarPainter, setShowNegativeXErrors, setShowNegativeYErrors, setShowPositiveXErrors, setShowPositiveYErrors, setTrace, startPaintIterationpublic ErrorBarPolicyRelative(double relativeError)
throws java.lang.IllegalArgumentException
The relative error is related to the absolut x and y values to render. It has to be between 0.0 and 1.0.
relativeError - the relative error value between 0.0 and 1.0 for x and y
dimension.java.lang.IllegalArgumentException - if the argument is not between 0.0 and 1.0.ErrorBarPolicyRelative(double, double)public ErrorBarPolicyRelative(double relativeXError,
double relativeYError)
throws java.lang.IllegalArgumentException
The relative error is related to the absolut x and y values to render. It has to be between 0.0 and 1.0.
relativeXError - the relative x error value between 0.0 and 1.0.relativeYError - the relative y error value between 0.0 and 1.0.java.lang.IllegalArgumentException - if the argument is not between 0.0 and 1.0.public boolean equals(java.lang.Object obj)
equals in class AErrorBarPolicyConfigurableObject.equals(java.lang.Object)public javax.swing.JComponent getCustomConfigurator()
IErrorBarPolicyJComponent that takes
care of custom configuration properties for the UI support of error bar
policies.
Returns a JComponent that - stand alone - takes care of
configuring custom properties or null if nothing is required. This will be
integrated in the error bar wizard UI of jchart2d.
getCustomConfigurator in interface IErrorBarPolicy<AErrorBarPolicyConfigurable>getCustomConfigurator in class AErrorBarPolicyConfigurableJComponent that - stand alone - takes care of
configuring custom properties or null if nothing is required.AErrorBarPolicyConfigurable.getCustomConfigurator()public final double getRelativeXError()
public final double getRelativeYError()
public final double getXError(double xValue)
IErrorBarPolicyxValue - the absolute x value (not pixel) to get the error for.IErrorBarPolicy.getXError(double)public final double getYError(double yValue)
IErrorBarPolicyyValue - the absolute y value (not pixel) to get the error for.IErrorBarPolicy.getYError(double)public int hashCode()
hashCode in class AErrorBarPolicyConfigurableObject.hashCode()protected int internalGetNegativeXError(int xPixel,
int yPixel,
ITracePoint2D original)
AErrorBarPolicyConfigurableinternalGetNegativeXError in class AErrorBarPolicyConfigurablexPixel - the x value in pixel for the error to render.yPixel - the y value in pixel for the error to render.original - the original point, possibly useful for calculations.AErrorBarPolicyConfigurable.internalGetNegativeXError(int,
int, info.monitorenter.gui.chart.ITracePoint2D)protected int internalGetNegativeYError(int xPixel,
int yPixel,
ITracePoint2D original)
AErrorBarPolicyConfigurableinternalGetNegativeYError in class AErrorBarPolicyConfigurablexPixel - the x value in pixel for the error to render.yPixel - the y value in pixel for the error to render.original - the original point, possibly useful for calculations.AErrorBarPolicyConfigurable.internalGetNegativeYError(int,
int, info.monitorenter.gui.chart.ITracePoint2D)protected int internalGetPositiveXError(int xPixel,
int yPixel,
ITracePoint2D original)
AErrorBarPolicyConfigurableinternalGetPositiveXError in class AErrorBarPolicyConfigurablexPixel - the x value in pixel for the error to render.yPixel - the y value in pixel for the error to render.original - the original point, possibly useful for calculations.AErrorBarPolicyConfigurable.internalGetPositiveXError(int,
int, info.monitorenter.gui.chart.ITracePoint2D)protected int internalGetPositiveYError(int xPixel,
int yPixel,
ITracePoint2D original)
AErrorBarPolicyConfigurableinternalGetPositiveYError in class AErrorBarPolicyConfigurablexPixel - the x coordinate in pixel for the error to render.yPixel - the y coordinate in pixel for the error to render.original - the original point, possibly useful for calculations.AErrorBarPolicyConfigurable.internalGetPositiveYError(int,
int, info.monitorenter.gui.chart.ITracePoint2D)public final void setRelativeXError(double relativeXError)
throws java.lang.IllegalArgumentException
The relative error is related to the absolute x values to render. It has to be between 0.0 and 1.0.
relativeXError - a value between 0.0 and 1.0.java.lang.IllegalArgumentException - if the argument is not between 0.0 and 1.0.public final void setRelativeYError(double relativeYError)
throws java.lang.IllegalArgumentException
The relative error is related to the absolut y values to render. It has to be between 0.0 and 1.0.
relativeYError - a value between 0.0 and 1.0.java.lang.IllegalArgumentException - if the argument is not between 0.0 and 1.0.Copyright © 2001 - 2010 LGPL, All Rights Footloose.