Package jcckit.plot
Interface Curve
- All Known Implementing Classes:
SimpleCurve
public interface Curve
A curve is defined by a sequence of points in device-independent
coordinates. The points can be decorated by symbols and/or
connected by lines.
Hints
are used to determine additional
properties of the symbol. This is especially important for
charts with bars.
In accordance with the Factory Method Pattern
the symbols are created by a SymbolFactory
.
-
Method Summary
Modifier and TypeMethodDescriptionaddPoint
(GraphPoint point, Hint hintFromPreviousCurve) Appends a new point to the curve.Returns a symbol which can be used to create the legend for the curve.getView()
Returns the graphical representation of a curve.void
Removes all points from the curve.
-
Method Details
-
getView
GraphicalElement getView()Returns the graphical representation of a curve. Different invocations of this method might return different instances. This is especially true after adding, inserting, removing, or repplacing a point of the curve. -
getLegendSymbol
GraphicalElement getLegendSymbol()Returns a symbol which can be used to create the legend for the curve. For example, it should return a horizontal line with the symbol in the middle if the curve is a line with points decorated by symbols. -
addPoint
Appends a new point to the curve.- Parameters:
point
- Position in device-independent coordinates.hintFromPreviousCurve
- Hint which may be used to calculate the correspondingGraphicalElement
.- Returns:
- hint for next curve.
-
removeAllPoints
void removeAllPoints()Removes all points from the curve.
-