public class StackedXYAreaRenderer extends XYAreaRenderer implements Cloneable, org.jfree.util.PublicCloneable, Serializable
XYPlot
class.
StackedXYAreaRendererDemo1.java
program included in the
JFreeChart demo collection:
StackedXYAreaRenderer2
class instead.AREA, AREA_AND_SHAPES, LINES, SHAPES, SHAPES_AND_LINES
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO
Constructor and Description |
---|
StackedXYAreaRenderer()
Creates a new renderer.
|
StackedXYAreaRenderer(int type)
Constructs a new renderer.
|
StackedXYAreaRenderer(int type,
XYToolTipGenerator labelGenerator,
XYURLGenerator urlGenerator)
Constructs a new renderer.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone of the renderer.
|
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.
|
boolean |
equals(Object obj)
Tests the renderer for equality with an arbitrary object.
|
Range |
findRangeBounds(XYDataset dataset)
Returns the range of values the renderer requires to display all the
items from the specified dataset.
|
int |
getPassCount()
Returns the number of passes required by the renderer.
|
Paint |
getShapePaint()
Returns the paint used for rendering shapes, or
null if
using series paints. |
Stroke |
getShapeStroke()
Returns the stroke used for rendering shapes, or
null if
using series strokes. |
XYItemRendererState |
initialise(Graphics2D g2,
Rectangle2D dataArea,
XYPlot plot,
XYDataset data,
PlotRenderingInfo info)
Initialises the renderer.
|
void |
setShapePaint(Paint shapePaint)
Sets the paint for rendering shapes and sends a
RendererChangeEvent to all registered listeners. |
void |
setShapeStroke(Stroke shapeStroke)
Sets the stroke for rendering shapes and sends a
RendererChangeEvent to all registered listeners. |
getGradientTransformer, getLegendArea, getLegendItem, getPlotArea, getPlotLines, getPlotShapes, getUseFillPaint, hashCode, isOutline, setGradientTransformer, setLegendArea, setOutline, setUseFillPaint
addAnnotation, addAnnotation, annotationChanged, drawAnnotations, drawDomainGridLine, drawDomainLine, drawDomainMarker, drawRangeLine, drawRangeMarker, fillDomainGridBand, fillRangeGridBand, findDomainBounds, getAnnotations, getBaseItemLabelGenerator, getBaseToolTipGenerator, getDrawingSupplier, getItemLabelGenerator, getItemLabelGenerator, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPlot, getSeriesItemLabelGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, getURLGenerator, isPointInRect, removeAnnotation, removeAnnotations, setBaseItemLabelGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesToolTipGenerator, setToolTipGenerator, setURLGenerator
addChangeListener, clearSeriesPaints, clearSeriesStrokes, getAutoPopulateSeriesFillPaint, getAutoPopulateSeriesOutlinePaint, getAutoPopulateSeriesOutlineStroke, getAutoPopulateSeriesPaint, getAutoPopulateSeriesShape, getAutoPopulateSeriesStroke, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseLegendShape, getBaseLegendTextFont, getBaseLegendTextPaint, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getDataBoundsIncludesVisibleSeriesOnly, getDefaultEntityRadius, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendShape, getLegendTextFont, getLegendTextPaint, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesPaint, lookupSeriesShape, lookupSeriesStroke, notifyListeners, removeChangeListener, setAutoPopulateSeriesFillPaint, setAutoPopulateSeriesOutlinePaint, setAutoPopulateSeriesOutlineStroke, setAutoPopulateSeriesPaint, setAutoPopulateSeriesShape, setAutoPopulateSeriesStroke, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseLegendShape, setBaseLegendTextFont, setBaseLegendTextPaint, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setDataBoundsIncludesVisibleSeriesOnly, setDefaultEntityRadius, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendShape, setLegendTextFont, setLegendTextPaint, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setShape, setStroke, setStroke
getClass, notify, notifyAll, toString, wait, wait, wait
addAnnotation, addAnnotation, addChangeListener, drawAnnotations, drawDomainGridLine, drawDomainMarker, drawRangeLine, drawRangeMarker, fillDomainGridBand, fillRangeGridBand, findDomainBounds, getBaseItemLabelFont, getBaseItemLabelGenerator, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getBaseToolTipGenerator, getItemLabelFont, getItemLabelFont, getItemLabelGenerator, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendItemLabelGenerator, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPlot, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelGenerator, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesToolTipGenerator, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, getToolTipGenerator, getURLGenerator, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeAnnotation, removeAnnotations, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelGenerator, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setBaseToolTipGenerator, setItemLabelFont, setItemLabelGenerator, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendItemLabelGenerator, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPlot, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelGenerator, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesToolTipGenerator, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke, setToolTipGenerator, setURLGenerator
getLegendItems
public StackedXYAreaRenderer()
public StackedXYAreaRenderer(int type)
type
- the type of the renderer.public StackedXYAreaRenderer(int type, XYToolTipGenerator labelGenerator, XYURLGenerator urlGenerator)
SHAPES
, LINES
,
SHAPES_AND_LINES
, AREA
or
AREA_AND_SHAPES
.type
- the type of renderer.labelGenerator
- the tool tip generator to use (null
is none).urlGenerator
- the URL generator (null
permitted).public Paint getShapePaint()
null
if
using series paints.null
).setShapePaint(Paint)
public void setShapePaint(Paint shapePaint)
RendererChangeEvent
to all registered listeners.shapePaint
- the paint (null
permitted).getShapePaint()
public Stroke getShapeStroke()
null
if
using series strokes.null
).setShapeStroke(Stroke)
public void setShapeStroke(Stroke shapeStroke)
RendererChangeEvent
to all registered listeners.shapeStroke
- the stroke (null
permitted).getShapeStroke()
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)
initialise
in interface XYItemRenderer
initialise
in class XYAreaRenderer
g2
- the graphics device.dataArea
- the area inside the axes.plot
- the plot.data
- the data.info
- an optional info collection object to return data back to
the caller.public int getPassCount()
getPassCount
in interface XYItemRenderer
getPassCount
in class AbstractXYItemRenderer
public Range findRangeBounds(XYDataset dataset)
findRangeBounds
in interface XYItemRenderer
findRangeBounds
in class AbstractXYItemRenderer
dataset
- the dataset (null
permitted).null
if the dataset is null
).ClassCastException
- if dataset
is not an instance
of TableXYDataset
.AbstractXYItemRenderer.findDomainBounds(XYDataset)
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)
drawItem
in interface XYItemRenderer
drawItem
in class XYAreaRenderer
g2
- the graphics device.state
- the renderer state.dataArea
- the area within which the data is being drawn.info
- collects information about the drawing.plot
- the plot (can be used to obtain standard color information
etc).domainAxis
- the domain axis.rangeAxis
- the range axis.dataset
- the dataset.series
- the series index (zero-based).item
- the item index (zero-based).crosshairState
- information about crosshairs on a plot.pass
- the pass index.ClassCastException
- if state
is not an instance of
StackedXYAreaRendererState
or dataset
is not an instance of TableXYDataset
.public boolean equals(Object obj)
equals
in class XYAreaRenderer
obj
- the object (null
permitted).public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class XYAreaRenderer
CloneNotSupportedException
- if the renderer cannot be cloned.Jas4pp 1.5 © Java Analysis Studio for Particle Physics