info.monitorenter.gui.chart.errorbars
Class ErrorBarPolicyAbsoluteSummation

java.lang.Object
  extended by info.monitorenter.gui.chart.errorbars.AErrorBarPolicyConfigurable
      extended by info.monitorenter.gui.chart.errorbars.ErrorBarPolicyAbsoluteSummation
All Implemented Interfaces:
IErrorBarPolicy<AErrorBarPolicyConfigurable>, IPointPainter<AErrorBarPolicyConfigurable>, ITracePainter<AErrorBarPolicyConfigurable>, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Comparable<AErrorBarPolicyConfigurable>, java.util.EventListener

public class ErrorBarPolicyAbsoluteSummation
extends AErrorBarPolicyConfigurable

Configurable IErrorBarPolicy that adds an absolute error (relative to the absolute values) to the points to render.

Version:
$Revision: 1.19 $
Author:
Achim Westermann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class info.monitorenter.gui.chart.errorbars.AErrorBarPolicyConfigurable
m_lastPoint, m_lastX, m_lastY, m_propertyChangeSupport
 
Fields inherited from interface info.monitorenter.gui.chart.IErrorBarPolicy
PROPERTY_CONFIGURATION, PROPERTY_ERRORBARPAINTER
 
Constructor Summary
ErrorBarPolicyAbsoluteSummation(double xError, double yError)
          Creates an instance with the given absolute errors to add in x and y direction.
 
Method Summary
 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 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 setXError(double xError)
          Sets the absolute x error to add to each error bar.
 void setYError(double yError)
          Sets the absolute y error to add to each error bar.
 
Methods inherited from class info.monitorenter.gui.chart.errorbars.AErrorBarPolicyConfigurable
addErrorBarPainter, addPropertyChangeListener, calculateErrorBar, compareTo, discontinue, endPaintIteration, firePropertyChange, getErrorBarPainters, getTrace, isShowNegativeXErrors, isShowNegativeYErrors, isShowPositiveXErrors, isShowPositiveYErrors, paintPoint, propertyChange, removeErrorBarPainter, removePropertyChangeListener, removePropertyChangeListener, setErrorBarPainter, setShowNegativeXErrors, setShowNegativeYErrors, setShowPositiveXErrors, setShowPositiveYErrors, setTrace, startPaintIteration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorBarPolicyAbsoluteSummation

public ErrorBarPolicyAbsoluteSummation(double xError,
                                       double yError)
                                throws java.lang.IllegalArgumentException
Creates an instance with the given absolute errors to add in x and y direction.

The absolute errors are added to / subtracted from the absolut x and y values to render.

Parameters:
xError - a positive value that is added to / subtracted from the x value to render.
yError - a positive value that is added to / subtracted from the y value to render.
Throws:
java.lang.IllegalArgumentException - if arguments are < 0.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AErrorBarPolicyConfigurable
See Also:
Object.equals(java.lang.Object)

getCustomConfigurator

public javax.swing.JComponent getCustomConfigurator()
Description copied from interface: IErrorBarPolicy
Allows an implementation to return a JComponent 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.

Specified by:
getCustomConfigurator in interface IErrorBarPolicy<AErrorBarPolicyConfigurable>
Overrides:
getCustomConfigurator in class AErrorBarPolicyConfigurable
Returns:
a JComponent that - stand alone - takes care of configuring custom properties or null if nothing is required.
See Also:
AErrorBarPolicyConfigurable.getCustomConfigurator()

getXError

public final double getXError(double xValue)
Description copied from interface: IErrorBarPolicy
Returns the relative x error (value domain) that is added to / subtracted from the values to display.

Parameters:
xValue - the absolute x value (not pixel) to get the error for.
Returns:
the relative x error in value domain that is added to / subtracted from the values to display.
See Also:
IErrorBarPolicy.getXError(double)

getYError

public final double getYError(double yValue)
Description copied from interface: IErrorBarPolicy
Returns the relative y error (value domain) that is added to / subtracted from the values to display.

Parameters:
yValue - the absolute y value (not pixel) to get the error for.
Returns:
the relative y error in value domain that is added to / subtracted from the values to display.
See Also:
IErrorBarPolicy.getYError(double)

hashCode

public int hashCode()
Overrides:
hashCode in class AErrorBarPolicyConfigurable
See Also:
Object.hashCode()

internalGetNegativeXError

protected int internalGetNegativeXError(int xPixel,
                                        int yPixel,
                                        ITracePoint2D original)
Description copied from class: AErrorBarPolicyConfigurable
Internally compute the negative x error for the given point as a pixel value (not relative to the the origin value).

Specified by:
internalGetNegativeXError in class AErrorBarPolicyConfigurable
Parameters:
xPixel - 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.
Returns:
the negative x error in pixel for the given point as an absolute value (not relative to the the origin value).
See Also:
AErrorBarPolicyConfigurable.internalGetNegativeXError(int, int, info.monitorenter.gui.chart.ITracePoint2D)

internalGetNegativeYError

protected int internalGetNegativeYError(int xPixel,
                                        int yPixel,
                                        ITracePoint2D original)
Description copied from class: AErrorBarPolicyConfigurable
Internally compute the negative y error for the given point as a pixel value (not relative to the the origin value).

Specified by:
internalGetNegativeYError in class AErrorBarPolicyConfigurable
Parameters:
xPixel - 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.
Returns:
the negative y error in pixel for the given point as an absolute value (not relative to the the origin value).
See Also:
AErrorBarPolicyConfigurable.internalGetNegativeYError(int, int, info.monitorenter.gui.chart.ITracePoint2D)

internalGetPositiveXError

protected int internalGetPositiveXError(int xPixel,
                                        int yPixel,
                                        ITracePoint2D original)
Description copied from class: AErrorBarPolicyConfigurable
Internally compute the positive x error in pixel for the given point as an absolute value (not relative to the the origin value).

Specified by:
internalGetPositiveXError in class AErrorBarPolicyConfigurable
Parameters:
xPixel - 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.
Returns:
the positive x error in pixel for the given point as an absolute value (not relative to the the origin value).
See Also:
AErrorBarPolicyConfigurable.internalGetPositiveXError(int, int, info.monitorenter.gui.chart.ITracePoint2D)

internalGetPositiveYError

protected int internalGetPositiveYError(int xPixel,
                                        int yPixel,
                                        ITracePoint2D original)
Description copied from class: AErrorBarPolicyConfigurable
Internally compute the positive y error in pixel for the given point as an absolute value (not relative to the the origin value).

Specified by:
internalGetPositiveYError in class AErrorBarPolicyConfigurable
Parameters:
xPixel - 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.
Returns:
the positive y error in pixel for the given point as an absolute value (not relative to the the origin value).
See Also:
AErrorBarPolicyConfigurable.internalGetPositiveYError(int, int, info.monitorenter.gui.chart.ITracePoint2D)

setXError

public final void setXError(double xError)
                     throws java.lang.IllegalArgumentException
Sets the absolute x error to add to each error bar.

The absolute error is added to the absolut x values to render. It has to be > 0.

Parameters:
xError - a positive value.
Throws:
java.lang.IllegalArgumentException - if the argument is < 0.

setYError

public final void setYError(double yError)
                     throws java.lang.IllegalArgumentException
Sets the absolute y error to add to each error bar.

The absolute error is added to the absolut y values to render. It has to be > 0.

Parameters:
yError - a positive value.
Throws:
java.lang.IllegalArgumentException - if the argument is < 0.


Copyright © 2001 - 2010 LGPL, All Rights Footloose.