T
- demonstration of unknown comparable and inheritance idiom or bad generics design for this case.public interface ITracePainter<T extends ITracePainter<T>> extends IPointPainter<T>
A contract for implementation is that Object.equals(java.lang.Object)
has to be
implemented to return true if two instances are of the same class and
Comparable.compareTo(java.lang.Object)
is implemented according to that. This
is OK as trace painters are mostly to characterize by their different implementation of rendering
a trace.
Graphics2D
instance
than painting just the label or tick will not produce layout problems. E.g. changing the color or
font is not recommended as these should be assigned to the
ITrace2D
/ Chart2D
.
Modifier and Type | Method and Description |
---|---|
void |
discontinue(Graphics g2d)
Invoked to inform the painter that a discontinue in the trace to # paint has occured.
|
endPaintIteration, paintPoint, startPaintIteration
compareTo
void discontinue(Graphics g2d)
This only has to be implemented by painters that collect several points of
IPointPainter.paintPoint(int, int, int, int, Graphics, ITracePoint2D)
to draw them as polygons (e.g.:
Graphics.drawPolyline(int[], int[], int)
).
g2d
- provided in case pending paint operations have to be performed.Copyright © 2001 - 2010 LGPL, All Rights Footloose.