lt.monarch.chart.chart2D.series
Class SteppedLineStrategy<ChartProjector extends Projector>

java.lang.Object
  extended by lt.monarch.chart.chart2D.series.AbstractLineStrategy<ChartProjector>
      extended by lt.monarch.chart.chart2D.series.LineStrategy<ChartProjector>
          extended by lt.monarch.chart.chart2D.series.SteppedLineStrategy<ChartProjector>
All Implemented Interfaces:
java.io.Serializable, AbstractStrategy

public class SteppedLineStrategy<ChartProjector extends Projector>
extends LineStrategy<ChartProjector>

Stepped line series strategy.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
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 Summary
Constructor and Description
SteppedLineStrategy()
          Stepped strategy constructor
 
Method Summary
Modifier and Type Method and Description
protected  void drawLine(AbstractGraphics g, AbstractLineSeries<ChartProjector> series)
          Paints the connected series line in the specified Graphics context.
 Point2D getLinePointByX(double x)
          Calculates line Point2D value for a given x coordinate.
 
Methods inherited from class lt.monarch.chart.chart2D.series.LineStrategy
binarySearch, cacheLines, determineLineDirection, dispose, draw, formNewPolygon, getDataValueMappingHeight, getEndIndex, getPointPosition, getStartIndex, getValue, initDrawing, isDataInverted, isStacked, showNullPoints
 
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SteppedLineStrategy

public SteppedLineStrategy()
Stepped strategy constructor

Method Detail

drawLine

protected void drawLine(AbstractGraphics g,
                        AbstractLineSeries<ChartProjector> series)
Paints the connected series line in the specified Graphics context.

Overrides:
drawLine in class LineStrategy<ChartProjector extends Projector>
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 - Chart series to which this strategy belongs
See Also:
AbstractChartSeries.setShowNullValues(boolean)

getLinePointByX

public Point2D getLinePointByX(double x)
Description copied from class: AbstractLineStrategy
Calculates line Point2D value for a given x coordinate.

Overrides:
getLinePointByX in class LineStrategy<ChartProjector extends Projector>
Parameters:
x - coordinate for which the corresponding line point must be calculated.
Returns:
y calculated line value