public class LevelRenderer extends AbstractCategoryItemRenderer implements Cloneable, org.jfree.util.PublicCloneable, Serializable
CategoryItemRenderer
that draws individual data items as
horizontal lines, spaced in the same way as bars in a bar chart. The
example shown here is generated by the
OverlaidBarChartDemo2.java
program included in the JFreeChart
Demo Collection:
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ITEM_MARGIN
The default item margin percentage.
|
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO
Constructor and Description |
---|
LevelRenderer()
Creates a new renderer with default settings.
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
equals(Object obj)
Tests an object for equality with this instance.
|
double |
getItemMargin()
Returns the item margin.
|
double |
getItemMiddle(Comparable rowKey,
Comparable columnKey,
CategoryDataset dataset,
CategoryAxis axis,
Rectangle2D area,
org.jfree.ui.RectangleEdge edge)
Returns the Java2D coordinate for the middle of the specified data item.
|
double |
getMaximumItemWidth()
Returns the maximum width, as a percentage of the available drawing
space.
|
double |
getMaxItemWidth()
Deprecated.
Use
getMaximumItemWidth() instead. |
int |
hashCode()
Returns a hash code for this instance.
|
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.
|
void |
setItemMargin(double percent)
Sets the item margin and sends a
RendererChangeEvent to all
registered listeners. |
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. |
void |
setMaxItemWidth(double percent)
Deprecated.
Use
setMaximumItemWidth(double) instead. |
clone, drawBackground, drawDomainGridline, drawDomainMarker, drawOutline, drawRangeGridline, drawRangeLine, drawRangeMarker, findRangeBounds, getBaseItemLabelGenerator, getBaseItemURLGenerator, getBaseToolTipGenerator, getColumnCount, getDrawingSupplier, getItemLabelGenerator, getItemURLGenerator, getLegendItem, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPassCount, getPlot, getRowCount, getSeriesItemLabelGenerator, getSeriesItemURLGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, setBaseItemLabelGenerator, setBaseItemURLGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setItemURLGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesItemURLGenerator, setSeriesToolTipGenerator, setToolTipGenerator
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
addChangeListener, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setItemLabelFont, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke
public static final double DEFAULT_ITEM_MARGIN
public LevelRenderer()
public double getItemMargin()
setItemMargin(double)
public void setItemMargin(double percent)
RendererChangeEvent
to all
registered listeners. 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.percent
- the new margin.getItemMargin()
public double getMaximumItemWidth()
setMaximumItemWidth(double)
public void setMaximumItemWidth(double percent)
RendererChangeEvent
to all registered listeners.percent
- the percent.getMaximumItemWidth()
public CategoryItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)
This method gets called once at the start of the process of drawing a chart.
initialise
in interface CategoryItemRenderer
initialise
in class AbstractCategoryItemRenderer
g2
- the graphics device.dataArea
- the area in which the data is to be plotted.plot
- the plot.rendererIndex
- the renderer index.info
- collects chart rendering information for return to caller.public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)
drawItem
in interface CategoryItemRenderer
g2
- the graphics device.state
- the renderer state.dataArea
- the data area.plot
- the plot.domainAxis
- the domain axis.rangeAxis
- the range axis.dataset
- the dataset.row
- the row index (zero-based).column
- the column index (zero-based).pass
- the pass index.public double getItemMiddle(Comparable rowKey, Comparable columnKey, CategoryDataset dataset, CategoryAxis axis, Rectangle2D area, org.jfree.ui.RectangleEdge edge)
getItemMiddle
in interface CategoryItemRenderer
getItemMiddle
in class AbstractCategoryItemRenderer
rowKey
- the row key.columnKey
- the column key.dataset
- the dataset.axis
- the axis.area
- the drawing area.edge
- the edge along which the axis lies.public boolean equals(Object obj)
equals
in class AbstractCategoryItemRenderer
obj
- the object (null
permitted).public int hashCode()
hashCode
in class AbstractCategoryItemRenderer
public double getMaxItemWidth()
getMaximumItemWidth()
instead.public void setMaxItemWidth(double percent)
setMaximumItemWidth(double)
instead.RendererChangeEvent
to all registered listeners.percent
- the percent.Jas4pp 1.5 © Java Analysis Studio for Particle Physics