|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcckit.plot.SimpleCurve
A simple curve is the basic implementation of the Curve
interface.
Field Summary | |
static java.lang.String |
INITIAL_HINT_FOR_NEXT_POINT_KEY
Configuration parameter key. |
static java.lang.String |
LINE_ATTRIBUTES_KEY
Configuration parameter key. |
static java.lang.String |
SOFT_CLIPPING_KEY
Configuration parameter key. |
static java.lang.String |
SYMBOL_FACTORY_KEY
Configuration parameter key. |
static java.lang.String |
WITH_LINE_KEY
Configuration parameter key. |
Constructor Summary | |
SimpleCurve(ConfigParameters config,
int curveIndex,
int numberOfCurves,
ClippingShape clippingShape,
Legend legend)
Creates a new curve. |
Method Summary | |
Hint |
addPoint(GraphPoint point,
Hint hintFromPreviousCurve)
Appends a new point to the curve if inside the clipping shape. |
GraphicalElement |
getLegendSymbol()
Returns the legend symbol. |
GraphicalElement |
getView()
Returns the graphical representation of a curve. |
void |
removeAllPoints()
Removes all points from the curve. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SYMBOL_FACTORY_KEY
public static final java.lang.String WITH_LINE_KEY
public static final java.lang.String SOFT_CLIPPING_KEY
public static final java.lang.String LINE_ATTRIBUTES_KEY
public static final java.lang.String INITIAL_HINT_FOR_NEXT_POINT_KEY
Constructor Detail |
public SimpleCurve(ConfigParameters config, int curveIndex, int numberOfCurves, ClippingShape clippingShape, Legend legend)
Key & Default Value | Type | Mandatory | Description |
---|---|---|---|
initialHintForNextPoint = null | ConfigParameters | no | Definition of an initial Hint for the first curve point.
|
lineAttributes = a ShapeAttributes
instances with default values and line colors based on
the formula Color.getHSBColor(curveIndex/6,1,0.8) |
ConfigParameters | no | Configuration parameters of an instances of
GraphicAttributes for the
Polygons connecting curve points. |
symbolFactory = null | ConfigParameters | no | Configuration parameters defining an instances of
SymbolFactory for the Symbols
decorating curve points. |
softClipping = true | boolean | no | If true no explicit clipping takes
place but the symbol is not drawn if the corresponding curve
point is outside the axis box. If false the symbol is drawn in any case but it may be clipped by the axis box. Soft-clipping should be set to false if the symbols are not located around the curve point (like for bars). |
withLine = true | boolean | no | If true curve points are connected by a
Polygon . |
config
- Configuration parameters described above.curveIndex
- Index of this curve in the collection of curves
defining a Plot
.numberOfCurves
- Number of curves in this collection.clippingShape
- Clipping shape. Can be null.legend
- Legend. Will be used to calculate the legend symbol.
java.lang.IllegalArgumentException
- if symbolFactory == null and
withLine == false.Method Detail |
public GraphicalElement getView()
getView
in interface Curve
public GraphicalElement getLegendSymbol()
getLegendSymbol
in interface Curve
public Hint addPoint(GraphPoint point, Hint hintFromPreviousCurve)
addPoint
in interface Curve
point
- Position in device-independent coordinates.hintFromPreviousCurve
- Hint which may be used to calculate
the corresponding GraphicalElement
.
public void removeAllPoints()
Curve
removeAllPoints
in interface Curve
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |