| org.jfree.chart.renderer.xy.AbstractXYItemRenderer org.jfree.chart.renderer.xy.XYAreaRenderer org.jfree.chart.renderer.xy.StackedXYAreaRenderer
StackedXYAreaRenderer | public class StackedXYAreaRenderer extends XYAreaRenderer implements Cloneable,PublicCloneable,Serializable(Code) | | A stacked area renderer for the
XYPlot class.
SPECIAL NOTE: This renderer does not currently handle negative data values
correctly. This should get fixed at some point, but the current workaround
is to use the
StackedXYAreaRenderer2 class instead.
|
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 | equals(Object obj) Tests the renderer for equality with an arbitrary object.
Parameters: obj - the object (null permitted). | public Range | findRangeBounds(XYDataset dataset) Returns the range of values the renderer requires to display all the
items from the specified dataset.
Parameters: dataset - the dataset (null permitted). | public int | getPassCount() Returns the number of passes required by the renderer. | protected double | getPreviousHeight(TableXYDataset dataset, int series, int index) Calculates the stacked value of the all series up to, but not including
series for the specified item. | public Paint | getShapePaint() Returns the paint used for rendering shapes, or null if
using series paints. | public Stroke | getShapeStroke() Returns the stroke used for rendering shapes, or null if
using series strokes. | public XYItemRendererState | initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info) Initialises the renderer. | public void | setShapePaint(Paint shapePaint) Sets the paint for rendering shapes and sends a
RendererChangeEvent to all registered listeners. | public void | setShapeStroke(Stroke shapeStroke) Sets the stroke for rendering shapes and sends a
RendererChangeEvent to all registered listeners. |
StackedXYAreaRenderer | public StackedXYAreaRenderer()(Code) | | Creates a new renderer.
|
StackedXYAreaRenderer | public StackedXYAreaRenderer(int type)(Code) | | Constructs a new renderer.
Parameters: type - the type of the renderer. |
StackedXYAreaRenderer | public StackedXYAreaRenderer(int type, XYToolTipGenerator labelGenerator, XYURLGenerator urlGenerator)(Code) | | Constructs a new renderer. To specify the type of renderer, use one of
the constants: SHAPES , LINES ,
SHAPES_AND_LINES , AREA or
AREA_AND_SHAPES .
Parameters: type - the type of renderer. Parameters: labelGenerator - the tool tip generator to use (null is none). Parameters: urlGenerator - the URL generator (null permitted). |
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 data is being drawn. Parameters: info - collects information 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 - information about crosshairs on a plot. Parameters: pass - the pass index. throws: ClassCastException - if state is not an instance ofStackedXYAreaRendererState or dataset is not an instance of TableXYDataset. |
equals | public boolean equals(Object obj)(Code) | | Tests the renderer for equality with an arbitrary object.
Parameters: obj - the object (null permitted). A boolean. |
findRangeBounds | public Range findRangeBounds(XYDataset dataset)(Code) | | Returns the range of values the renderer requires to display all the
items from the specified dataset.
Parameters: dataset - the dataset (null permitted). The range ([0.0, 0.0] if the dataset contains no values, and null if the dataset is null ). throws: ClassCastException - if dataset is not an instanceof TableXYDataset. |
getPassCount | public int getPassCount()(Code) | | Returns the number of passes required by the renderer.
2. |
getPreviousHeight | protected double getPreviousHeight(TableXYDataset dataset, int series, int index)(Code) | | Calculates the stacked value of the all series up to, but not including
series for the specified item. It returns 0.0 if
series is the first series, i.e. 0.
Parameters: dataset - the dataset. Parameters: series - the series. Parameters: index - the index. The cumulative value for all series' values up to but excluding series for index . |
initialise | public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)(Code) | | Initialises the renderer. 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.
Parameters: g2 - the graphics device. Parameters: dataArea - the area inside the axes. Parameters: plot - the plot. Parameters: data - the data. Parameters: info - an optional info collection object to return data back to the caller. A state object that should be passed to subsequent calls to the drawItem() method. |
Methods inherited from org.jfree.chart.renderer.xy.XYAreaRenderer | public Object clone() throws CloneNotSupportedException(Code)(Java Doc) 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)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public Shape getLegendArea()(Code)(Java Doc) public LegendItem getLegendItem(int datasetIndex, int series)(Code)(Java Doc) public boolean getPlotArea()(Code)(Java Doc) public boolean getPlotLines()(Code)(Java Doc) public boolean getPlotShapes()(Code)(Java Doc) public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)(Code)(Java Doc) public boolean isOutline()(Code)(Java Doc) public void setLegendArea(Shape area)(Code)(Java Doc) public void setOutline(boolean show)(Code)(Java Doc)
|
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)
|
|
|