lt.monarch.chart.chart3D.series
Class Spline3DStrategy

java.lang.Object
  extended by lt.monarch.chart.chart3D.series.AbstractLine3DStrategy
      extended by lt.monarch.chart.chart3D.series.Line3DStrategy
          extended by lt.monarch.chart.chart3D.series.Spline3DStrategy
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NaturalCubicSpline3DStrategy, NullSpline3DStrategy

public class Spline3DStrategy
extends Line3DStrategy

In this strategy all null point values are skipped and cannot be displayed in any way.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  int step
          Step line number between two data points
 
Fields inherited from class lt.monarch.chart.chart3D.series.Line3DStrategy
bottomPolygon, firstX, isSortedSeries, lastX, lineWidth, polygon, pseudoModel
 
Fields inherited from class lt.monarch.chart.chart3D.series.AbstractLine3DStrategy
baseValue, dirty, isConnected, mapper, metaModel, minMaxValues, model, paintMode, planePoint, projector, showNullValues, style, tempPoint, xMapper, yMapper, zMapper, zoomMultiplier
 
Constructor Summary
Constructor and Description
Spline3DStrategy()
          Default spline strategy constructor
 
Method Summary
Modifier and Type Method and Description
protected  Polygon3D calculateSpline(Polygon3D polygon)
          Creates spline polygon (from simple polygon)
protected  Point3D[] calculateSplinePoints(double[] x, double[] y, double[] z, int pointCount)
          Calculate spline points.
protected  void drawAndFill(AbstractGraphics g, Polygon3D contour, Polygon3D bottom, boolean drawNulls, Line3DSeries series, ChartObjectsMap map, HotSpotMap hotMap, int index)
          Draws 3D line
protected  void drawLine(AbstractGraphics g, Line3DSeries series, HotSpotMap hotMap)
          Paints the connected series line in the specified Graphics context.
 int getStep()
          Gets spline step number
 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.chart3D.series.Line3DStrategy
appendSeriesRectangles, buildSeriesPolygons, dispose, draw, formNewPolygon, getDataValueMappingHeight, getLineWidth, getPointPosition, initDrawing, isDataInverted, isStacked, projectPolygon, setLineWidth
 
Methods inherited from class lt.monarch.chart.chart3D.series.AbstractLine3DStrategy
finalize, getMinMaxValues, getX, getY, getZ, projectPoint
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

step

protected int step
Step line number between two data points

Constructor Detail

Spline3DStrategy

public Spline3DStrategy()
Default spline strategy constructor

Method Detail

drawLine

protected void drawLine(AbstractGraphics g,
                        Line3DSeries series,
                        HotSpotMap hotMap)
Description copied from class: Line3DStrategy
Paints the connected series line in the specified Graphics context.

Overrides:
drawLine in class Line3DStrategy
Parameters:
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 - lt.monarch.chart.chart3D.series.Line3DSeries
hotMap - lt.monarch.chart.engine.HotSpotMap
See Also:
AbstractChartSeries.setShowNullValues(boolean)

calculateSpline

protected Polygon3D calculateSpline(Polygon3D polygon)
Creates spline polygon (from simple polygon)

Parameters:
polygon -
Returns:
spline polygon

drawAndFill

protected void drawAndFill(AbstractGraphics g,
                           Polygon3D contour,
                           Polygon3D bottom,
                           boolean drawNulls,
                           Line3DSeries series,
                           ChartObjectsMap map,
                           HotSpotMap hotMap,
                           int index)
Draws 3D line

Parameters:
g -
contour - - lines top
bottom - - lines bottom
drawNulls - - if true - use SeriesPaintTags.NULL; if false - SeriesPaintTags.DEFAULT
series - lt.monarch.chart.chart3D.series.Line3DSeries
map - lt.monarch.chart.engine.ChartObjectsMap
hotMap - lt.monarch.chart.engine.HotSpotMap
index - int

calculateSplinePoints

protected Point3D[] calculateSplinePoints(double[] x,
                                          double[] y,
                                          double[] z,
                                          int pointCount)
Calculate spline points. !!! Points size should be (pointCoint - 1)*(step+1) !!!

Parameters:
x -
y -
z -
pointCount -
Returns:

getStep

public int getStep()
Gets spline step number

Returns:
the step number

setStep

public void setStep(int step)
Sets the spline step number, i.e. how much lines should consist the line between two points.

Parameters:
step - line number between two data points

showNullPoints

protected boolean showNullPoints()
Description copied from class: Line3DStrategy
Checks and returns if user has set nullLineColor or nullFillColor objects. This means that user would like to see the probable values instead of nulls (if it is possible).

Overrides:
showNullPoints in class Line3DStrategy
Returns:
boolean showing that null values should be drawn.