|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IErrorBarPainter
Interface for a renderer of error bars.
It contains a similar method to
IPointPainter.paintPoint(int, int, int, int, Graphics, ITracePoint2D)
with an additional IErrorBarPixel
for
getting information about the error to render.
A visible error bar consists of three parts:
IPointPainter
instances (which are used
by ITracePainter
implementations too.
If one of these three parts (see the setters) is null, the corresponding part should not be painted.
A further configuration is to define the colors of these parts by the according setters.
Nested Class Summary | |
---|---|
static interface |
IErrorBarPainter.ISegment
Facace interface for accessing a connection segment of . |
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CONNECTION
The property key defining the connection property. |
static java.lang.String |
PROPERTY_CONNECTION_COLOR
The property key defining the connectionColor property. |
static java.lang.String |
PROPERTY_ENDPOINT
The property key defining the endPointPainter property. |
static java.lang.String |
PROPERTY_ENDPOINT_COLOR
The property key defining the endPointColor property. |
static java.lang.String |
PROPERTY_STARTPOINT
The property key defining the startPointPaint property. |
static java.lang.String |
PROPERTY_STARTPOINT_COLOR
The property key defining the startPointColor property. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Registers a property change listener that will be informed about changes of the property identified by the given propertyName . |
java.awt.Color |
getConnectionColor()
Returns the color of the connection segment or null if unconfigured. |
IPointPainter<?> |
getConnectionPainter()
Returns the painter for the connection segment of the error bar. |
java.awt.Color |
getEndPointColor()
Returns the color of the end point or null if unconfigured. |
IPointPainterConfigurableUI<?> |
getEndPointPainter()
Returns the painter for the end point of the error bar. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String property)
Returns all property change listeners for the given property. |
IErrorBarPainter.ISegment |
getSegmentConnection()
Returns the facade instance for accessing the connection segment of this configurable error bar painter. |
IErrorBarPainter.ISegment |
getSegmentEnd()
Returns the facade instance for accessing the end segment of this configurable error bar painter. |
IErrorBarPainter.ISegment |
getSegmentStart()
Returns the facade instance for accessing the start segment of this configurable error bar painter. |
java.awt.Color |
getStartPointColor()
Returns the color of the start point or null if unconfigured. |
IPointPainterConfigurableUI<?> |
getStartPointPainter()
Returns the painter for the start point of the error bar. |
void |
paintErrorBar(int absoluteX,
int absoluteY,
ITracePoint2D original,
java.awt.Graphics g,
IErrorBarPixel errorBar)
Paint the error bar for the point given by absolute coordinates on the given graphic context. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Unregisters a property change listener that has been registered for listening on all properties. |
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Removes a property change listener for listening on the given property. |
void |
setConnectionColor(java.awt.Color connectionColor)
Sets the color for the connection segment. |
void |
setConnectionPainter(IPointPainterConfigurableUI<?> connectionPainter)
Note that the choice for the right point painter has to be taken with care: It is senseless to use an implementation that does not interconnect both coordinates given to IPointPainter.paintPoint(int, int, int, int, Graphics, ITracePoint2D)
. |
void |
setEndPointColor(java.awt.Color endPointColor)
Sets the color for the end point. |
void |
setEndPointPainter(IPointPainterConfigurableUI<?> endPointPainter)
Sets the painter for the end point of the error bar. |
void |
setStartPointColor(java.awt.Color startPointColor)
Sets the color for the start point. |
void |
setStartPointPainter(IPointPainterConfigurableUI<?> startPointPainter)
Note that the choice for the right point painter has to be taken with care: It is senseless to use an implementation that interconnects both coordinates given to IPointPainter.paintPoint(int, int, int, int, Graphics, ITracePoint2D)
. |
Field Detail |
---|
static final java.lang.String PROPERTY_CONNECTION
connection
property. Use in
combination with
addPropertyChangeListener(String, PropertyChangeListener)
.
static final java.lang.String PROPERTY_CONNECTION_COLOR
connectionColor
property. Use in
combination with
addPropertyChangeListener(String, PropertyChangeListener)
.
static final java.lang.String PROPERTY_ENDPOINT
endPointPainter
property. Use in
combination with
addPropertyChangeListener(String, PropertyChangeListener)
.
static final java.lang.String PROPERTY_ENDPOINT_COLOR
endPointColor
property. Use in
combination with
addPropertyChangeListener(String, PropertyChangeListener)
.
static final java.lang.String PROPERTY_STARTPOINT
startPointPaint
property. Use in
combination with
addPropertyChangeListener(String, PropertyChangeListener)
.
static final java.lang.String PROPERTY_STARTPOINT_COLOR
startPointColor
property. Use in
combination with
addPropertyChangeListener(String, PropertyChangeListener)
.
Method Detail |
---|
void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
.
PropertyChangeListener
instances may be added via
Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
. They inherit the properties to listen from
Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
. Additionally more PropertyChangeEvents
should be triggered
(contract for implementation!).
PropertyChangeEvent
instances will be
fired to registered PropertyChangeListener
instances.
getPropertyName() |
getSource() |
getOldValue() |
getNewValue() |
comment |
---|---|---|---|---|
|
that changed. |
. |
. |
Note that null as the old value indicates a new painter. Null as the new value is valid and means that the end point rendering is turned off. |
|
that changed. |
. |
. |
Note that null as the old value indicates a new painter. Null as the new value is valid and means that the start point rendering is turned off. |
|
that changed. |
. |
. |
Note that null as the old value indicates a new painter. Null as the new value is valid and means that the connection segment point rendering is turned off. |
|
that changed. |
. |
. |
Note that null as the old value indicates a new color different from the default. Null as the new value is valid and means that the end point color is switched to default. |
|
that changed. |
. |
. |
Note that null as the old value indicates a new color different from the default. Null as the new value is valid and means that the start point color is switched to default. |
|
that changed. |
. |
. |
Note that null as the old value indicates a new color different from the default. Null as the new value is valid and means that the connection segment color is switched to default. |
propertyName
- the name of the property the listener is interested inlistener
- a listener that will only be informed if the property identified
by the argument propertyName
changesjava.awt.Color getConnectionColor()
IPointPainter<?> getConnectionPainter()
java.awt.Color getEndPointColor()
IPointPainterConfigurableUI<?> getEndPointPainter()
java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String property)
property
- one of the constants with the PROPERTY_
prefix
defined in this class or subclasses.
IErrorBarPainter.ISegment getSegmentConnection()
IErrorBarPainter.ISegment getSegmentEnd()
IErrorBarPainter.ISegment getSegmentStart()
java.awt.Color getStartPointColor()
IPointPainterConfigurableUI<?> getStartPointPainter()
void paintErrorBar(int absoluteX, int absoluteY, ITracePoint2D original, java.awt.Graphics g, IErrorBarPixel errorBar)
Basic implementations should modularize further and allow configuration for
the way of painting the connection segments, the start point (origin) and
end point of the error bar with implementations of IPointPainter
.
absoluteX
- the ready to use x value for the point to paint.absoluteY
- the ready to use y value for the point to paint.errorBar
- contains the data for the errors to render.original
- the original trace point this error bar is painted for.g
- the graphic context to paint on.IErrorBarPixel
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a listener that will only be informed if the property identified
by the argument propertyName
changesvoid removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- one of the constants with teh PROPERTY_
prefix
defined in this class or subclasses.listener
- the listener for this property change.void setConnectionColor(java.awt.Color connectionColor)
If this is not used or null is provided, the color of the corresponding trace will be used. If no underlying connection painter exists nothing will be done.
connectionColor
- The connection segment color to set.void setConnectionPainter(IPointPainterConfigurableUI<?> connectionPainter)
IPointPainter.paintPoint(int, int, int, int, Graphics, ITracePoint2D)
.
Choosing a
PointPainterLine
will
have the same visual effect as setting such an instance for the start point
painter.
Currently the only useful choice is the
PointPainterLine
or null
(to make the connection segment invisible). But the interface is open
enough to use implementations that would paint interpolated dots, discs,
squares,... whatever you think of (contribute!).
connectionPainter
- The connection segmentPainter to set.void setEndPointColor(java.awt.Color endPointColor)
If this is not used or null is provided, the color of the corresponding trace will be used. If no underlying end point painter exists nothing will be done.
endPointColor
- The end point color to set.void setEndPointPainter(IPointPainterConfigurableUI<?> endPointPainter)
Note that the choice for the right point painter has to be taken with care:
It is senseless to use an implementation that interconnects both
coordinates given to
IPointPainter.paintPoint(int, int, int, int, Graphics, ITracePoint2D)
.
Choosing a
PointPainterLine
will
have the same visual effect as setting such an instance for the connection
segment painter.
endPointPainter
- The end point painter to set.void setStartPointColor(java.awt.Color startPointColor)
If this is not used or null is provided, the color of the corresponding trace will be used. If no underlying start point painter exists nothing will be done.
startPointColor
- The start point color to set.void setStartPointPainter(IPointPainterConfigurableUI<?> startPointPainter)
IPointPainter.paintPoint(int, int, int, int, Graphics, ITracePoint2D)
.
Choosing a
PointPainterLine
will
have the same visual effect as setting such an instance for the connection
segment painter.
startPointPainter
- The startPointPainter to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |