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

java.lang.Object
  extended by lt.monarch.chart.chart2D.series.AbstractQuoteStrategy<ChartProjector>
      extended by lt.monarch.chart.chart2D.series.QuoteHLCStrategy<ChartProjector>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
QuoteOHLCStrategy

public class QuoteHLCStrategy<ChartProjector extends Projector>
extends AbstractQuoteStrategy<ChartProjector>

Stock series drawing strategy. This strategy draws series as a sequence of the High-Low-Close symbols

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  Point2D np
           
protected  Point2D p1
           
protected  Point2D p2
           
 
Fields inherited from class lt.monarch.chart.chart2D.series.AbstractQuoteStrategy
baseValue, dirty, mapper, metaModel, minMaxValues, model, paintMode, planePoint, projector, style, tempPoint, xMapper, yMapper, zoomMultiplier
 
Constructor Summary
Constructor and Description
QuoteHLCStrategy()
          Stock High-Low-Close strategy constructor
 
Method Summary
Modifier and Type Method and Description
protected  Line2D[] createLines(double w, double x, double min, double max, double open, double close)
          Return primitive shape array of stock
 void dispose()
          Disposes the object
 void draw(AbstractGraphics g, ChartProjector projector, PlaneMapper mapper, HotSpotMap hotMap, Style style, java.lang.Object baseValue, StockSeries series)
          Draws the series in the chart area.
 double getRelativeWidth()
          Returns relative stock element width in interval [0;1].
 void setRelativeWidth(double width)
          Sets relative stock element width in interval [0;1].
 
Methods inherited from class lt.monarch.chart.chart2D.series.AbstractQuoteStrategy
finalize, getMinMaxValues, projectPoint
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p1

protected Point2D p1

p2

protected Point2D p2

np

protected Point2D np
Constructor Detail

QuoteHLCStrategy

public QuoteHLCStrategy()
Stock High-Low-Close strategy constructor

Method Detail

dispose

public void dispose()
Description copied from class: AbstractQuoteStrategy
Disposes the object

Specified by:
dispose in class AbstractQuoteStrategy<ChartProjector extends Projector>

draw

public void draw(AbstractGraphics g,
                 ChartProjector projector,
                 PlaneMapper mapper,
                 HotSpotMap hotMap,
                 Style style,
                 java.lang.Object baseValue,
                 StockSeries series)
Description copied from class: AbstractQuoteStrategy
Draws the series in the chart area.

Overrides:
draw in class AbstractQuoteStrategy<ChartProjector extends Projector>
Parameters:
g - graphics context
projector - projector instance
mapper - plane mapper
hotMap - hot spot map
style - style object
baseValue - base value
series - scatter series instance

createLines

protected Line2D[] createLines(double w,
                               double x,
                               double min,
                               double max,
                               double open,
                               double close)
Return primitive shape array of stock

Parameters:
w - width of open or close
x - key data column, which corresponds to X value
min - extent data column, which corresponds low value
max - value data column, which corresponds high value
open - extra data column, which corresponds open value
close - extra2 data column, which corresponds close value
Returns:
stock primitive array of shape Line2D

setRelativeWidth

public void setRelativeWidth(double width)
Sets relative stock element width in interval [0;1].

Parameters:
width - relative width in interval [0;1]

getRelativeWidth

public double getRelativeWidth()
Returns relative stock element width in interval [0;1].

Returns:
relative width