| org.jfree.chart.renderer.category.AbstractCategoryItemRenderer org.jfree.chart.renderer.category.LevelRenderer
Field Summary | |
final public static double | DEFAULT_ITEM_MARGIN The default item margin percentage. |
Constructor Summary | |
public | LevelRenderer() Creates a new renderer with default settings. |
Method Summary | |
protected double | calculateBarW0(CategoryPlot plot, PlotOrientation orientation, Rectangle2D dataArea, CategoryAxis domainAxis, CategoryItemRendererState state, int row, int column) Calculates the coordinate of the first "side" of a bar. | protected void | calculateItemWidth(CategoryPlot plot, Rectangle2D dataArea, int rendererIndex, CategoryItemRendererState state) Calculates the bar width and stores it in the renderer state. | protected double | calculateSeriesWidth(double space, CategoryAxis axis, int categories, int series) Calculates the available space for each series.
Parameters: space - the space along the entire axis (in Java2D units). Parameters: axis - the category axis. Parameters: categories - the number of categories. Parameters: series - the number of series. | public void | drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) Draws the bar for a single (series, category) data item. | public boolean | equals(Object obj) Tests an object for equality with this instance.
Parameters: obj - the object (null permitted). | public double | getItemMargin() Returns the item margin. | public double | getMaxItemWidth() Returns the maximum width, as a percentage of the available drawing
space. | public double | getMaximumItemWidth() Returns the maximum width, as a percentage of the available drawing
space. | public CategoryItemRendererState | initialise(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info) Initialises the renderer and returns a state object that will be passed
to subsequent calls to the drawItem method.
This method gets called once at the start of the process of drawing a
chart.
Parameters: g2 - the graphics device. Parameters: dataArea - the area in which the data is to be plotted. Parameters: plot - the plot. Parameters: rendererIndex - the renderer index. Parameters: info - collects chart rendering information for return to caller. | public void | setItemMargin(double percent) Sets the item margin. | public void | setMaxItemWidth(double percent) Sets the maximum item width, which is specified as a percentage of the
available space for all items, and sends a
RendererChangeEvent
to all registered listeners. | public void | setMaximumItemWidth(double percent) Sets the maximum item width, which is specified as a percentage of the
available space for all items, and sends a
RendererChangeEvent
to all registered listeners. |
DEFAULT_ITEM_MARGIN | final public static double DEFAULT_ITEM_MARGIN(Code) | | The default item margin percentage.
|
LevelRenderer | public LevelRenderer()(Code) | | Creates a new renderer with default settings.
|
calculateBarW0 | protected double calculateBarW0(CategoryPlot plot, PlotOrientation orientation, Rectangle2D dataArea, CategoryAxis domainAxis, CategoryItemRendererState state, int row, int column)(Code) | | Calculates the coordinate of the first "side" of a bar. This will be
the minimum x-coordinate for a vertical bar, and the minimum
y-coordinate for a horizontal bar.
Parameters: plot - the plot. Parameters: orientation - the plot orientation. Parameters: dataArea - the data area. Parameters: domainAxis - the domain axis. Parameters: state - the renderer state (has the bar width precalculated). Parameters: row - the row index. Parameters: column - the column index. The coordinate. |
calculateItemWidth | protected void calculateItemWidth(CategoryPlot plot, Rectangle2D dataArea, int rendererIndex, CategoryItemRendererState state)(Code) | | Calculates the bar width and stores it in the renderer state.
Parameters: plot - the plot. Parameters: dataArea - the data area. Parameters: rendererIndex - the renderer index. Parameters: state - the renderer state. |
calculateSeriesWidth | protected double calculateSeriesWidth(double space, CategoryAxis axis, int categories, int series)(Code) | | Calculates the available space for each series.
Parameters: space - the space along the entire axis (in Java2D units). Parameters: axis - the category axis. Parameters: categories - the number of categories. Parameters: series - the number of series. The width of one series. |
drawItem | public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)(Code) | | Draws the bar for a single (series, category) data item.
Parameters: g2 - the graphics device. Parameters: state - the renderer state. Parameters: dataArea - the data area. Parameters: plot - the plot. Parameters: domainAxis - the domain axis. Parameters: rangeAxis - the range axis. Parameters: dataset - the dataset. Parameters: row - the row index (zero-based). Parameters: column - the column index (zero-based). Parameters: pass - the pass index. |
equals | public boolean equals(Object obj)(Code) | | Tests an object for equality with this instance.
Parameters: obj - the object (null permitted). A boolean. |
getItemMargin | public double getItemMargin()(Code) | | Returns the item margin.
The margin. |
getMaximumItemWidth | public double getMaximumItemWidth()(Code) | | Returns the maximum width, as a percentage of the available drawing
space.
The maximum width. |
initialise | public CategoryItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)(Code) | | Initialises the renderer and returns a state object that will be passed
to subsequent calls to the drawItem method.
This method gets called once at the start of the process of drawing a
chart.
Parameters: g2 - the graphics device. Parameters: dataArea - the area in which the data is to be plotted. Parameters: plot - the plot. Parameters: rendererIndex - the renderer index. Parameters: info - collects chart rendering information for return to caller. The renderer state. |
setItemMargin | public void setItemMargin(double percent)(Code) | | Sets the item margin. The value is expressed as a percentage of the
available width for plotting all the bars, with the resulting amount to
be distributed between all the bars evenly.
Parameters: percent - the new margin. |
setMaximumItemWidth | public void setMaximumItemWidth(double percent)(Code) | | Sets the maximum item width, which is specified as a percentage of the
available space for all items, and sends a
RendererChangeEvent
to all registered listeners.
Parameters: percent - the percent. |
Methods inherited from org.jfree.chart.renderer.category.AbstractCategoryItemRenderer | protected void addItemEntity(EntityCollection entities, CategoryDataset dataset, int row, int column, Shape hotspot)(Code)(Java Doc) protected Point2D calculateDomainMarkerTextAnchorPoint(Graphics2D g2, PlotOrientation orientation, Rectangle2D dataArea, Rectangle2D markerArea, RectangleInsets markerOffset, LengthAdjustmentType labelOffsetType, RectangleAnchor anchor)(Code)(Java Doc) protected Point2D calculateRangeMarkerTextAnchorPoint(Graphics2D g2, PlotOrientation orientation, Rectangle2D dataArea, Rectangle2D markerArea, RectangleInsets markerOffset, LengthAdjustmentType labelOffsetType, RectangleAnchor anchor)(Code)(Java Doc) public Object clone() throws CloneNotSupportedException(Code)(Java Doc) protected CategoryItemRendererState createState(PlotRenderingInfo info)(Code)(Java Doc) public void drawBackground(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)(Code)(Java Doc) public void drawDomainGridline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, double value)(Code)(Java Doc) public void drawDomainMarker(Graphics2D g2, CategoryPlot plot, CategoryAxis axis, CategoryMarker marker, Rectangle2D dataArea)(Code)(Java Doc) protected void drawItemLabel(Graphics2D g2, PlotOrientation orientation, CategoryDataset dataset, int row, int column, double x, double y, boolean negative)(Code)(Java Doc) public void drawOutline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)(Code)(Java Doc) public void drawRangeGridline(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Rectangle2D dataArea, double value)(Code)(Java Doc) public void drawRangeMarker(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, Rectangle2D dataArea)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public Range findRangeBounds(CategoryDataset dataset)(Code)(Java Doc) public CategoryItemLabelGenerator getBaseItemLabelGenerator()(Code)(Java Doc) public CategoryURLGenerator getBaseItemURLGenerator()(Code)(Java Doc) public CategoryToolTipGenerator getBaseToolTipGenerator()(Code)(Java Doc) public int getColumnCount()(Code)(Java Doc) protected CategoryAxis getDomainAxis(CategoryPlot plot, int index)(Code)(Java Doc) public DrawingSupplier getDrawingSupplier()(Code)(Java Doc) public CategoryItemLabelGenerator getItemLabelGenerator(int row, int column)(Code)(Java Doc) public CategoryURLGenerator getItemURLGenerator(int row, int column)(Code)(Java Doc) public LegendItem getLegendItem(int datasetIndex, int series)(Code)(Java Doc) public CategorySeriesLabelGenerator getLegendItemLabelGenerator()(Code)(Java Doc) public CategorySeriesLabelGenerator getLegendItemToolTipGenerator()(Code)(Java Doc) public CategorySeriesLabelGenerator getLegendItemURLGenerator()(Code)(Java Doc) public LegendItemCollection getLegendItems()(Code)(Java Doc) public int getPassCount()(Code)(Java Doc) public CategoryPlot getPlot()(Code)(Java Doc) protected ValueAxis getRangeAxis(CategoryPlot plot, int index)(Code)(Java Doc) public int getRowCount()(Code)(Java Doc) public CategoryItemLabelGenerator getSeriesItemLabelGenerator(int series)(Code)(Java Doc) public CategoryURLGenerator getSeriesItemURLGenerator(int series)(Code)(Java Doc) public CategoryToolTipGenerator getSeriesToolTipGenerator(int series)(Code)(Java Doc) public CategoryToolTipGenerator getToolTipGenerator(int row, int column)(Code)(Java Doc) public CategoryToolTipGenerator getToolTipGenerator()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public CategoryItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)(Code)(Java Doc) public void setBaseItemLabelGenerator(CategoryItemLabelGenerator generator)(Code)(Java Doc) public void setBaseItemURLGenerator(CategoryURLGenerator generator)(Code)(Java Doc) public void setBaseToolTipGenerator(CategoryToolTipGenerator generator)(Code)(Java Doc) public void setItemLabelGenerator(CategoryItemLabelGenerator generator)(Code)(Java Doc) public void setItemURLGenerator(CategoryURLGenerator generator)(Code)(Java Doc) public void setLegendItemLabelGenerator(CategorySeriesLabelGenerator generator)(Code)(Java Doc) public void setLegendItemToolTipGenerator(CategorySeriesLabelGenerator generator)(Code)(Java Doc) public void setLegendItemURLGenerator(CategorySeriesLabelGenerator generator)(Code)(Java Doc) public void setPlot(CategoryPlot plot)(Code)(Java Doc) public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator)(Code)(Java Doc) public void setSeriesItemURLGenerator(int series, CategoryURLGenerator generator)(Code)(Java Doc) public void setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator)(Code)(Java Doc) public void setToolTipGenerator(CategoryToolTipGenerator generator)(Code)(Java Doc)
|
|
|