| org.jfree.chart.renderer.xy.AbstractXYItemRenderer org.jfree.chart.renderer.xy.XYBarRenderer org.jfree.chart.renderer.xy.ClusteredXYBarRenderer
ClusteredXYBarRenderer | public class ClusteredXYBarRenderer extends XYBarRenderer implements Cloneable,PublicCloneable,Serializable(Code) | | An extension of
XYBarRenderer that displays bars for different
series values at the same x next to each other. The assumption here is
that for each x (time or else) there is a y value for each series. If
this is not the case, there will be spaces between bars for a given x.
This renderer does not include code to calculate the crosshair point for the
plot.
|
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 this renderer for equality with an arbitrary object, returning
true if obj is a
ClusteredXYBarRenderer with the same settings as this
renderer, and false otherwise.
Parameters: obj - the object (null permitted). | public Range | findDomainBounds(XYDataset dataset) Returns the x-value bounds for the specified dataset.
Parameters: dataset - the dataset (null permitted). | protected Range | findDomainBoundsWithOffset(IntervalXYDataset dataset) Iterates over the items in an
IntervalXYDataset to find
the range of x-values including the interval OFFSET so that it centers
the interval around the start value. |
ClusteredXYBarRenderer | public ClusteredXYBarRenderer()(Code) | | Default constructor. Bar margin is set to 0.0.
|
ClusteredXYBarRenderer | public ClusteredXYBarRenderer(double margin, boolean centerBarAtStartValue)(Code) | | Constructs a new XY clustered bar renderer.
Parameters: margin - the percentage amount to trim from the width of each bar. Parameters: centerBarAtStartValue - if true, bars will be centered on the start of the time period. |
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. This method
is mostly copied from the superclass, the change is that in the
calculated space for a singe bar we draw bars for each series next to
each other. The width of each bar is the available width divided by
the number of series. Bars for each series are drawn in order left to
right.
Parameters: g2 - the graphics device. Parameters: state - the renderer state. Parameters: dataArea - the area within which the plot 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. Parameters: item - the item index. 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 an arbitrary object, returning
true if obj is a
ClusteredXYBarRenderer with the same settings as this
renderer, and false otherwise.
Parameters: obj - the object (null permitted). A boolean. |
findDomainBounds | public Range findDomainBounds(XYDataset dataset)(Code) | | Returns the x-value bounds for the specified dataset.
Parameters: dataset - the dataset (null permitted). The bounds (possibly null ). |
findDomainBoundsWithOffset | protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset)(Code) | | Iterates over the items in an
IntervalXYDataset to find
the range of x-values including the interval OFFSET so that it centers
the interval around the start value.
Parameters: dataset - the dataset (null not permitted). The range (possibly null ). |
Methods inherited from org.jfree.chart.renderer.xy.XYBarRenderer | 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) protected void drawItemLabel(Graphics2D g2, XYDataset dataset, int series, int item, XYPlot plot, XYItemLabelGenerator generator, Rectangle2D bar, boolean negative)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public Range findDomainBounds(XYDataset dataset)(Code)(Java Doc) public double getBase()(Code)(Java Doc) public GradientPaintTransformer getGradientPaintTransformer()(Code)(Java Doc) public Shape getLegendBar()(Code)(Java Doc) public LegendItem getLegendItem(int datasetIndex, int series)(Code)(Java Doc) public double getMargin()(Code)(Java Doc) public ItemLabelPosition getNegativeItemLabelPositionFallback()(Code)(Java Doc) public ItemLabelPosition getPositiveItemLabelPositionFallback()(Code)(Java Doc) public boolean getUseYInterval()(Code)(Java Doc) public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset dataset, PlotRenderingInfo info)(Code)(Java Doc) public boolean isDrawBarOutline()(Code)(Java Doc) public void setBase(double base)(Code)(Java Doc) public void setDrawBarOutline(boolean draw)(Code)(Java Doc) public void setGradientPaintTransformer(GradientPaintTransformer transformer)(Code)(Java Doc) public void setLegendBar(Shape bar)(Code)(Java Doc) public void setMargin(double margin)(Code)(Java Doc) public void setNegativeItemLabelPositionFallback(ItemLabelPosition position)(Code)(Java Doc) public void setPositiveItemLabelPositionFallback(ItemLabelPosition position)(Code)(Java Doc) public void setUseYInterval(boolean use)(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)
|
|
|