|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.chart2D.series.AbstractLineStrategy<ChartProjector>
lt.monarch.chart.chart2D.series.LineStrategy<ChartProjector>
lt.monarch.chart.chart2D.series.SplineStrategy<ChartProjector>
public class SplineStrategy<ChartProjector extends Projector> extends LineStrategy<ChartProjector>
In this strategy all null point values are skipped and cannot be displayed in any way.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SplineStrategy.SplinePolygon
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Double |
end
|
protected AbstractSpline |
splineStrategy
|
protected java.lang.Double |
start
|
protected int |
step
Step count |
| Fields inherited from class lt.monarch.chart.chart2D.series.LineStrategy |
|---|
bottomPolygon, firstX, isSortedSeries, lastX, lineOrientation, polygon, pseudoModel |
| Fields inherited from class lt.monarch.chart.chart2D.series.AbstractLineStrategy |
|---|
baseValue, cachingEnabled, dirty, isConnected, mapper, metaModel, minMaxValues, model, paintMode, planePoint, projector, showNullValues, style, tempPoint, xMapper, yMapper, zoomMultiplier |
| Constructor and Description |
|---|
SplineStrategy()
Default spline strategy constructor |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPoint(Projector projector,
GeneralPoint tempPoint,
Point2D planePoint,
Polygon2D polygon,
double x,
double y)
Adds points to the polygon |
protected java.util.List<SplineStrategy.SplinePolygon> |
calculatePoints(AbstractGraphics g,
AbstractSpline splineStrategy,
ArrayDataModel model,
PseudoArrayDataModel pseudoModel)
Paints the spline series in the specified Graphics context. |
void |
dispose()
Disposes the object |
protected void |
drawLine(AbstractGraphics g,
AbstractLineSeries<ChartProjector> series)
Paints the connected series line in the specified Graphics context. |
protected void |
drawLineAndFill(AbstractGraphics g,
Projector projector,
SplineStrategy.SplinePolygon spline,
SplineStrategy.SplinePolygon bottomSpline,
AbstractLineSeries<ChartProjector> series)
Draws the polyline and toFill polygon |
protected void |
finalize()
|
Point2D |
getLinePointByX(double x)
Calculates line Point2D value for a given x coordinate. |
AbstractSpline |
getSplineStrategy()
Gets spline implementation strategy |
int |
getStep()
Gets spline step number |
java.lang.Object |
getYValue(java.lang.Object x)
Calculates spline Y value for a given X value. |
java.lang.Object[] |
getYValues(java.lang.Object x)
Calculates spline Y values for a given X value. |
void |
setSplineStrategy(AbstractSpline splineStrategy)
Sets spline implementation strategy, which defines the points of the spline. |
void |
setStep(int step)
Sets the spline step number, i.e. |
protected boolean |
showNullPoints()
Checks and returns if user has set nullLineColor or nullFillColor objects. |
| Methods inherited from class lt.monarch.chart.chart2D.series.LineStrategy |
|---|
binarySearch, cacheLines, determineLineDirection, draw, formNewPolygon, getDataValueMappingHeight, getEndIndex, getPointPosition, getStartIndex, getValue, initDrawing, isDataInverted, isStacked |
| Methods inherited from class lt.monarch.chart.chart2D.series.AbstractLineStrategy |
|---|
calculateSelection, getMinMaxValues, getModel, getX, getY, projectPoint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AbstractSpline splineStrategy
protected int step
protected java.lang.Double start
protected java.lang.Double end
| Constructor Detail |
|---|
public SplineStrategy()
| Method Detail |
|---|
protected void drawLine(AbstractGraphics g,
AbstractLineSeries<ChartProjector> series)
LineStrategy
drawLine in class LineStrategy<ChartProjector extends Projector>g - the Graphics context in which to paint the series line. NOTE:
setShowNullValues(boolean) works a little different here. When set to true, the
line is broken and started from the next non-null point value. When set to false,
the null values are simply ignored: the line connects all non-null value points.series - Chart series to which this strategy belongsAbstractChartSeries.setShowNullValues(boolean)
protected java.util.List<SplineStrategy.SplinePolygon> calculatePoints(AbstractGraphics g,
AbstractSpline splineStrategy,
ArrayDataModel model,
PseudoArrayDataModel pseudoModel)
g - the Graphics context in which to paint the seriessplineStrategy - spline drawing strategy (i.e. the AbstractSpline implementation)model - data model of the splinepseudoModel - pseudo data model of the spline, for null determination
protected void addPoint(Projector projector,
GeneralPoint tempPoint,
Point2D planePoint,
Polygon2D polygon,
double x,
double y)
projector - ProjectortempPoint - Normalized pointplanePoint - Pointpolygon - Polygon which will be drawnx - X coordinatey - Y coordinate
protected void drawLineAndFill(AbstractGraphics g,
Projector projector,
SplineStrategy.SplinePolygon spline,
SplineStrategy.SplinePolygon bottomSpline,
AbstractLineSeries<ChartProjector> series)
g - Graphicsprojector - Projectorarea - Polygon pointsbottomPolygon - bottom polygonfirst - First x pointlast - Last x pointseries - Chart series to which this strategy belongspublic java.lang.Object getYValue(java.lang.Object x)
x - value for which the corresponding y value must be calculated.public Point2D getLinePointByX(double x)
AbstractLineStrategy
getLinePointByX in class LineStrategy<ChartProjector extends Projector>x - coordinate for which the corresponding line point must be calculated.public java.lang.Object[] getYValues(java.lang.Object x)
x - value for which the corresponding y value must be calculated.protected boolean showNullPoints()
LineStrategy
showNullPoints in class LineStrategy<ChartProjector extends Projector>
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void dispose()
AbstractLineStrategy
dispose in class LineStrategy<ChartProjector extends Projector>public AbstractSpline getSplineStrategy()
public void setSplineStrategy(AbstractSpline splineStrategy)
splineStrategy - the spline implementation strategypublic int getStep()
public void setStep(int step)
step - line number between two data points
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||