|
|||||||||
| Home >> All >> org >> jfree >> chart >> renderer >> [ category overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jfree.chart.renderer.category
Class LevelRenderer

java.lang.Objectorg.jfree.chart.renderer.AbstractRenderer
org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
org.jfree.chart.renderer.category.LevelRenderer
- All Implemented Interfaces:
- CategoryItemRenderer, java.lang.Cloneable, org.jfree.chart.LegendItemSource, org.jfree.util.PublicCloneable, java.io.Serializable
- public class LevelRenderer
- extends AbstractCategoryItemRenderer
- implements java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
- extends AbstractCategoryItemRenderer
A CategoryItemRenderer that draws individual data items as horizontal lines, spaced in the same way as bars in a bar chart.
| Field Summary | |
static double |
DEFAULT_ITEM_MARGIN
The default item margin percentage. |
private double |
itemMargin
The margin between items within a category. |
private double |
maxItemWidth
The maximum item width as a percentage of the available space. |
private static long |
serialVersionUID
For serialization. |
| Fields inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer |
|
| Fields inherited from class org.jfree.chart.renderer.AbstractRenderer |
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO |
| Constructor Summary | |
LevelRenderer()
Creates a new renderer with default settings. |
|
| Method Summary | |
protected double |
calculateBarW0(org.jfree.chart.plot.CategoryPlot plot,
org.jfree.chart.plot.PlotOrientation orientation,
java.awt.geom.Rectangle2D dataArea,
org.jfree.chart.axis.CategoryAxis domainAxis,
CategoryItemRendererState state,
int row,
int column)
Calculates the coordinate of the first "side" of a bar. |
protected void |
calculateItemWidth(org.jfree.chart.plot.CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea,
int rendererIndex,
CategoryItemRendererState state)
Calculates the bar width and stores it in the renderer state. |
protected double |
calculateSeriesWidth(double space,
org.jfree.chart.axis.CategoryAxis axis,
int categories,
int series)
Calculates the available space for each series. |
void |
drawItem(java.awt.Graphics2D g2,
CategoryItemRendererState state,
java.awt.geom.Rectangle2D dataArea,
org.jfree.chart.plot.CategoryPlot plot,
org.jfree.chart.axis.CategoryAxis domainAxis,
org.jfree.chart.axis.ValueAxis rangeAxis,
org.jfree.data.category.CategoryDataset dataset,
int row,
int column,
int pass)
Draws the bar for a single (series, category) data item. |
boolean |
equals(java.lang.Object obj)
Tests an object for equality with this instance. |
double |
getItemMargin()
Returns the item margin. |
double |
getMaxItemWidth()
Returns the maximum width, as a percentage of the available drawing space. |
CategoryItemRendererState |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.chart.plot.CategoryPlot plot,
int rendererIndex,
org.jfree.chart.plot.PlotRenderingInfo info)
Initialises the renderer and returns a state object that will be passed to subsequent calls to the drawItem method. |
void |
setItemMargin(double percent)
Sets the item margin. |
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 org.jfree.chart.event.RendererChangeEvent to all registered listeners. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jfree.util.PublicCloneable |
clone |
| Field Detail |
serialVersionUID
private static final long serialVersionUID
- For serialization.
- See Also:
- Constant Field Values
DEFAULT_ITEM_MARGIN
public static final double DEFAULT_ITEM_MARGIN
- The default item margin percentage.
- See Also:
- Constant Field Values
itemMargin
private double itemMargin
- The margin between items within a category.
maxItemWidth
private double maxItemWidth
- The maximum item width as a percentage of the available space.
| Constructor Detail |
LevelRenderer
public LevelRenderer()
- Creates a new renderer with default settings.
| Method Detail |
getItemMargin
public double getItemMargin()
- Returns the item margin.
setItemMargin
public void setItemMargin(double percent)
- 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.
getMaxItemWidth
public double getMaxItemWidth()
- Returns the maximum width, as a percentage of the available drawing
space.
setMaxItemWidth
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 org.jfree.chart.event.RendererChangeEvent
to all registered listeners.
initialise
public CategoryItemRendererState initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.plot.CategoryPlot plot, int rendererIndex, org.jfree.chart.plot.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.
- Specified by:
initialisein interfaceCategoryItemRenderer- Overrides:
initialisein classAbstractCategoryItemRenderer
calculateItemWidth
protected void calculateItemWidth(org.jfree.chart.plot.CategoryPlot plot, java.awt.geom.Rectangle2D dataArea, int rendererIndex, CategoryItemRendererState state)
- Calculates the bar width and stores it in the renderer state.
calculateBarW0
protected double calculateBarW0(org.jfree.chart.plot.CategoryPlot plot, org.jfree.chart.plot.PlotOrientation orientation, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.axis.CategoryAxis domainAxis, CategoryItemRendererState state, int row, int column)
- 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.
drawItem
public void drawItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.plot.CategoryPlot plot, org.jfree.chart.axis.CategoryAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.data.category.CategoryDataset dataset, int row, int column, int pass)
- Draws the bar for a single (series, category) data item.
- Specified by:
drawItemin interfaceCategoryItemRenderer
calculateSeriesWidth
protected double calculateSeriesWidth(double space,
org.jfree.chart.axis.CategoryAxis axis,
int categories,
int series)
- Calculates the available space for each series.
equals
public boolean equals(java.lang.Object obj)
- Tests an object for equality with this instance.
- Overrides:
equalsin classAbstractCategoryItemRenderer
|
|||||||||
| Home >> All >> org >> jfree >> chart >> renderer >> [ category overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC