| org.jfree.chart.renderer.xy.AbstractXYItemRenderer org.jfree.chart.renderer.xy.CandlestickRenderer
Constructor Summary | |
public | CandlestickRenderer() Creates a new renderer for candlestick charts. | public | CandlestickRenderer(double candleWidth) Creates a new renderer for candlestick charts. | public | CandlestickRenderer(double candleWidth, boolean drawVolume, XYToolTipGenerator toolTipGenerator) Creates a new renderer for candlestick charts.
Use -1 for the candle width if you prefer the width to be calculated
automatically.
Parameters: candleWidth - the candle width. Parameters: drawVolume - a flag indicating whether or not volume bars should be drawn. Parameters: toolTipGenerator - the tool tip generator. |
Method Summary | |
public Object | clone() Returns a clone of the renderer. | public void | drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass) Draws the visual representation of a single data item. | public boolean | drawVolume() Returns a flag indicating whether or not volume bars are drawn on the
chart. | public boolean | equals(Object obj) Tests this renderer for equality with another object.
Parameters: obj - the object (null permitted). | public double | getAutoWidthFactor() Returns the factor by which the available space automatically
calculated for the candles will be multiplied to determine the actual
width to use. | public double | getAutoWidthGap() Returns the amount of space to leave on the left and right of each
candle when automatically calculating widths. | public int | getAutoWidthMethod() Returns the method of automatically calculating the candle width. | public double | getCandleWidth() Returns the width of each candle. | public Paint | getDownPaint() Returns the paint used to fill candles when the price moves down from
open to close. | public boolean | getDrawVolume() Returns a flag indicating whether or not volume bars are drawn on the
chart. | public double | getMaxCandleWidthInMilliseconds() Returns the maximum width (in milliseconds) of each candle. | public Paint | getUpPaint() Returns the paint used to fill candles when the price moves up from open
to close. | public boolean | getUseOutlinePaint() Returns the flag that controls whether or not the renderer's outline
paint is used to draw the candlestick outline. | public XYItemRendererState | initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset dataset, PlotRenderingInfo info) Initialises the renderer then returns the number of 'passes' through the
data that the renderer will require (usually just one). | public void | setAutoWidthFactor(double autoWidthFactor) Sets the factor by which the available space automatically calculated
for the candles will be multiplied to determine the actual width to use. | public void | setAutoWidthGap(double autoWidthGap) Sets the amount of space to leave on the left and right of each candle
when automatically calculating widths. | public void | setAutoWidthMethod(int autoWidthMethod) Sets the method of automatically calculating the candle width. | public void | setCandleWidth(double width) Sets the candle width. | public void | setDownPaint(Paint paint) Sets the paint used to fill candles when the price moves down from open
to close and sends a
RendererChangeEvent to all registered
listeners. | public void | setDrawVolume(boolean flag) Sets a flag that controls whether or not volume bars are drawn in the
background and sends a
RendererChangeEvent to all registered
listeners. | public void | setMaxCandleWidthInMilliseconds(double millis) Sets the maximum candle width (in milliseconds). | public void | setUpPaint(Paint paint) Sets the paint used to fill candles when the price moves up from open
to close and sends a
RendererChangeEvent to all registered
listeners. | public void | setUseOutlinePaint(boolean use) Sets the flag that controls whether or not the renderer's outline
paint is used to draw the candlestick outline, and sends a
RendererChangeEvent to all registered listeners. |
WIDTHMETHOD_AVERAGE | final public static int WIDTHMETHOD_AVERAGE(Code) | | The average width method.
|
WIDTHMETHOD_INTERVALDATA | final public static int WIDTHMETHOD_INTERVALDATA(Code) | | The interval data method.
|
WIDTHMETHOD_SMALLEST | final public static int WIDTHMETHOD_SMALLEST(Code) | | The smallest width method.
|
CandlestickRenderer | public CandlestickRenderer()(Code) | | Creates a new renderer for candlestick charts.
|
CandlestickRenderer | public CandlestickRenderer(double candleWidth)(Code) | | Creates a new renderer for candlestick charts.
Use -1 for the candle width if you prefer the width to be calculated
automatically.
Parameters: candleWidth - The candle width. |
CandlestickRenderer | public CandlestickRenderer(double candleWidth, boolean drawVolume, XYToolTipGenerator toolTipGenerator)(Code) | | Creates a new renderer for candlestick charts.
Use -1 for the candle width if you prefer the width to be calculated
automatically.
Parameters: candleWidth - the candle width. Parameters: drawVolume - a flag indicating whether or not volume bars should be drawn. Parameters: toolTipGenerator - the tool tip generator. null is none. |
drawItem | public void drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass)(Code) | | Draws the visual representation of a single data item.
Parameters: g2 - the graphics device. Parameters: state - the renderer state. Parameters: dataArea - the area within which the plot is being drawn. Parameters: info - collects info about the drawing. Parameters: plot - the plot (can be used to obtain standard color information etc). Parameters: domainAxis - the domain axis. Parameters: rangeAxis - the range axis. Parameters: dataset - the dataset. Parameters: series - the series index (zero-based). Parameters: item - the item index (zero-based). Parameters: crosshairState - crosshair information for the plot (null permitted). Parameters: pass - the pass index. |
equals | public boolean equals(Object obj)(Code) | | Tests this renderer for equality with another object.
Parameters: obj - the object (null permitted). true or false . |
getAutoWidthFactor | public double getAutoWidthFactor()(Code) | | Returns the factor by which the available space automatically
calculated for the candles will be multiplied to determine the actual
width to use.
The width factor (generally between 0.0 and 1.0). See Also: CandlestickRenderer.setAutoWidthFactor(double) |
getUseOutlinePaint | public boolean getUseOutlinePaint()(Code) | | Returns the flag that controls whether or not the renderer's outline
paint is used to draw the candlestick outline. The default value is
false .
A boolean. since: 1.0.5 See Also: CandlestickRenderer.setUseOutlinePaint(boolean) |
initialise | public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset dataset, PlotRenderingInfo info)(Code) | | Initialises the renderer then returns the number of 'passes' through the
data that the renderer will require (usually just one). This method
will be called before the first item is rendered, giving the renderer
an opportunity to initialise any state information it wants to maintain.
The renderer can do nothing if it chooses.
Parameters: g2 - the graphics device. Parameters: dataArea - the area inside the axes. Parameters: plot - the plot. Parameters: dataset - the data. Parameters: info - an optional info collection object to return data back to the caller. The number of passes the renderer requires. |
setDownPaint | public void setDownPaint(Paint paint)(Code) | | Sets the paint used to fill candles when the price moves down from open
to close and sends a
RendererChangeEvent to all registered
listeners.
Parameters: paint - The paint (null permitted). |
setUseOutlinePaint | public void setUseOutlinePaint(boolean use)(Code) | | Sets the flag that controls whether or not the renderer's outline
paint is used to draw the candlestick outline, and sends a
RendererChangeEvent to all registered listeners.
Parameters: use - the new flag value. since: 1.0.5 See Also: CandlestickRenderer.getUseOutlinePaint() |
Methods inherited from org.jfree.chart.renderer.xy.AbstractXYItemRenderer | public void addAnnotation(XYAnnotation annotation)(Code)(Java Doc) public void addAnnotation(XYAnnotation annotation, Layer layer)(Code)(Java Doc) protected void addEntity(EntityCollection entities, Shape area, XYDataset dataset, int series, int item, double entityX, double entityY)(Code)(Java Doc) protected Point2D calculateDomainMarkerTextAnchorPoint(Graphics2D g2, PlotOrientation orientation, Rectangle2D dataArea, Rectangle2D markerArea, RectangleInsets markerOffset, LengthAdjustmentType labelOffsetType, RectangleAnchor anchor)(Code)(Java Doc) protected Object clone() throws CloneNotSupportedException(Code)(Java Doc) public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, Layer layer, PlotRenderingInfo info)(Code)(Java Doc) public void drawDomainGridLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value)(Code)(Java Doc) public void drawDomainLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value, Paint paint, Stroke stroke)(Code)(Java Doc) public void drawDomainMarker(Graphics2D g2, XYPlot plot, ValueAxis domainAxis, Marker marker, Rectangle2D dataArea)(Code)(Java Doc) protected void drawItemLabel(Graphics2D g2, PlotOrientation orientation, XYDataset dataset, int series, int item, double x, double y, boolean negative)(Code)(Java Doc) public void drawRangeLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value, Paint paint, Stroke stroke)(Code)(Java Doc) public void drawRangeMarker(Graphics2D g2, XYPlot plot, ValueAxis rangeAxis, Marker marker, Rectangle2D dataArea)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public void fillDomainGridBand(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double start, double end)(Code)(Java Doc) public void fillRangeGridBand(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double start, double end)(Code)(Java Doc) public Range findDomainBounds(XYDataset dataset)(Code)(Java Doc) public Range findRangeBounds(XYDataset dataset)(Code)(Java Doc) public XYItemLabelGenerator getBaseItemLabelGenerator()(Code)(Java Doc) public XYToolTipGenerator getBaseToolTipGenerator()(Code)(Java Doc) public int getDefaultEntityRadius()(Code)(Java Doc) public DrawingSupplier getDrawingSupplier()(Code)(Java Doc) public XYItemLabelGenerator getItemLabelGenerator(int series, int item)(Code)(Java Doc) public XYItemLabelGenerator getItemLabelGenerator()(Code)(Java Doc) public LegendItem getLegendItem(int datasetIndex, int series)(Code)(Java Doc) public XYSeriesLabelGenerator getLegendItemLabelGenerator()(Code)(Java Doc) public XYSeriesLabelGenerator getLegendItemToolTipGenerator()(Code)(Java Doc) public XYSeriesLabelGenerator getLegendItemURLGenerator()(Code)(Java Doc) public LegendItemCollection getLegendItems()(Code)(Java Doc) public int getPassCount()(Code)(Java Doc) public XYPlot getPlot()(Code)(Java Doc) public XYItemLabelGenerator getSeriesItemLabelGenerator(int series)(Code)(Java Doc) public XYToolTipGenerator getSeriesToolTipGenerator(int series)(Code)(Java Doc) public XYToolTipGenerator getToolTipGenerator(int series, int item)(Code)(Java Doc) public XYToolTipGenerator getToolTipGenerator()(Code)(Java Doc) public XYURLGenerator getURLGenerator()(Code)(Java Doc) public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)(Code)(Java Doc) public boolean removeAnnotation(XYAnnotation annotation)(Code)(Java Doc) public void removeAnnotations()(Code)(Java Doc) public void setBaseItemLabelGenerator(XYItemLabelGenerator generator)(Code)(Java Doc) public void setBaseToolTipGenerator(XYToolTipGenerator generator)(Code)(Java Doc) public void setDefaultEntityRadius(int radius)(Code)(Java Doc) public void setItemLabelGenerator(XYItemLabelGenerator generator)(Code)(Java Doc) public void setLegendItemLabelGenerator(XYSeriesLabelGenerator generator)(Code)(Java Doc) public void setLegendItemToolTipGenerator(XYSeriesLabelGenerator generator)(Code)(Java Doc) public void setLegendItemURLGenerator(XYSeriesLabelGenerator generator)(Code)(Java Doc) public void setPlot(XYPlot plot)(Code)(Java Doc) public void setSeriesItemLabelGenerator(int series, XYItemLabelGenerator generator)(Code)(Java Doc) public void setSeriesToolTipGenerator(int series, XYToolTipGenerator generator)(Code)(Java Doc) public void setToolTipGenerator(XYToolTipGenerator generator)(Code)(Java Doc) public void setURLGenerator(XYURLGenerator urlGenerator)(Code)(Java Doc) protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, double transX, double transY, PlotOrientation orientation)(Code)(Java Doc) protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation)(Code)(Java Doc)
|
|
|