org.jfree.chart.renderer.category
Class MinMaxCategoryRenderer
java.lang.Object
org.jfree.chart.renderer.AbstractRenderer
org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
org.jfree.chart.renderer.category.MinMaxCategoryRenderer
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, LegendItemSource, CategoryItemRenderer, org.jfree.util.PublicCloneable
public class MinMaxCategoryRenderer
- extends AbstractCategoryItemRenderer
Renderer for drawing min max plot. This renderer draws all the series under
the same category in the same x position using objectIcon
and
a line from the maximum value to the minimum value. For use with the
CategoryPlot
class. The example shown here is generated by
the MinMaxCategoryPlotDemo1.java
program included in the
JFreeChart Demo Collection:
- See Also:
- Serialized Form
Method Summary |
void |
drawItem(java.awt.Graphics2D g2,
CategoryItemRendererState state,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryDataset dataset,
int row,
int column,
int pass)
Draw a single data item. |
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object. |
java.awt.Paint |
getGroupPaint()
Returns the paint used to draw the line between the minimum and maximum
value items in each category. |
java.awt.Stroke |
getGroupStroke()
Returns the stroke used to draw the line between the minimum and maximum
value items in each category. |
javax.swing.Icon |
getMaxIcon()
Returns the icon displayed for the maximum value data item within each
category. |
javax.swing.Icon |
getMinIcon()
Returns the icon displayed for the minimum value data item within each
category. |
javax.swing.Icon |
getObjectIcon()
Returns the icon drawn for each data item. |
boolean |
isDrawLines()
Gets whether or not lines are drawn between category points. |
void |
setDrawLines(boolean draw)
Sets the flag that controls whether or not lines are drawn to connect
the items within a series and sends a RendererChangeEvent to
all registered listeners. |
void |
setGroupPaint(java.awt.Paint paint)
Sets the paint used to draw the line between the minimum and maximum
value items in each category and sends a RendererChangeEvent to
all registered listeners. |
void |
setGroupStroke(java.awt.Stroke stroke)
Sets the stroke of the line between the minimum value and the maximum
value and sends a RendererChangeEvent to all registered
listeners. |
void |
setMaxIcon(javax.swing.Icon icon)
Sets the icon displayed for the maximum value data item within each
category and sends a RendererChangeEvent to all registered
listeners. |
void |
setMinIcon(javax.swing.Icon icon)
Sets the icon displayed for the minimum value data item within each
category and sends a RendererChangeEvent to all registered
listeners. |
void |
setObjectIcon(javax.swing.Icon icon)
Sets the icon drawn for each data item and sends a
RendererChangeEvent to all registered listeners. |
Methods inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer |
addEntity, addItemEntity, calculateDomainMarkerTextAnchorPoint, calculateRangeMarkerTextAnchorPoint, clone, createState, drawBackground, drawDomainGridline, drawDomainMarker, drawItemLabel, drawOutline, drawRangeGridline, drawRangeLine, drawRangeMarker, findRangeBounds, findRangeBounds, getBaseItemLabelGenerator, getBaseItemURLGenerator, getBaseToolTipGenerator, getColumnCount, getDomainAxis, getDrawingSupplier, getItemLabelGenerator, getItemMiddle, getItemURLGenerator, getLegendItem, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPassCount, getPlot, getRangeAxis, getRowCount, getSeriesItemLabelGenerator, getSeriesItemURLGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, hashCode, initialise, setBaseItemLabelGenerator, setBaseItemURLGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setItemURLGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesItemURLGenerator, setSeriesToolTipGenerator, setToolTipGenerator, updateCrosshairValues |
Methods inherited from class org.jfree.chart.renderer.AbstractRenderer |
addChangeListener, calculateLabelAnchorPoint, clearSeriesPaints, clearSeriesStrokes, fireChangeEvent, 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 |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.chart.renderer.category.CategoryItemRenderer |
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 |
MinMaxCategoryRenderer
public MinMaxCategoryRenderer()
- Default constructor.
isDrawLines
public boolean isDrawLines()
- Gets whether or not lines are drawn between category points.
- Returns:
- boolean true if line will be drawn between sequenced categories,
otherwise false.
- See Also:
setDrawLines(boolean)
setDrawLines
public void setDrawLines(boolean draw)
- Sets the flag that controls whether or not lines are drawn to connect
the items within a series and sends a
RendererChangeEvent
to
all registered listeners.
- Parameters:
draw
- the new value of the flag.- See Also:
isDrawLines()
getGroupPaint
public java.awt.Paint getGroupPaint()
- Returns the paint used to draw the line between the minimum and maximum
value items in each category.
- Returns:
- The paint (never
null
). - See Also:
setGroupPaint(Paint)
setGroupPaint
public void setGroupPaint(java.awt.Paint paint)
- Sets the paint used to draw the line between the minimum and maximum
value items in each category and sends a
RendererChangeEvent
to
all registered listeners.
- Parameters:
paint
- the paint (null
not permitted).- See Also:
getGroupPaint()
getGroupStroke
public java.awt.Stroke getGroupStroke()
- Returns the stroke used to draw the line between the minimum and maximum
value items in each category.
- Returns:
- The stroke (never
null
). - See Also:
setGroupStroke(Stroke)
setGroupStroke
public void setGroupStroke(java.awt.Stroke stroke)
- Sets the stroke of the line between the minimum value and the maximum
value and sends a
RendererChangeEvent
to all registered
listeners.
- Parameters:
stroke
- the new stroke (null
not permitted).
getObjectIcon
public javax.swing.Icon getObjectIcon()
- Returns the icon drawn for each data item.
- Returns:
- The icon (never
null
). - See Also:
setObjectIcon(Icon)
setObjectIcon
public void setObjectIcon(javax.swing.Icon icon)
- Sets the icon drawn for each data item and sends a
RendererChangeEvent
to all registered listeners.
- Parameters:
icon
- the icon.- See Also:
getObjectIcon()
getMaxIcon
public javax.swing.Icon getMaxIcon()
- Returns the icon displayed for the maximum value data item within each
category.
- Returns:
- The icon (never
null
). - See Also:
setMaxIcon(Icon)
setMaxIcon
public void setMaxIcon(javax.swing.Icon icon)
- Sets the icon displayed for the maximum value data item within each
category and sends a
RendererChangeEvent
to all registered
listeners.
- Parameters:
icon
- the icon (null
not permitted).- See Also:
getMaxIcon()
getMinIcon
public javax.swing.Icon getMinIcon()
- Returns the icon displayed for the minimum value data item within each
category.
- Returns:
- The icon (never
null
). - See Also:
setMinIcon(Icon)
setMinIcon
public void setMinIcon(javax.swing.Icon icon)
- Sets the icon displayed for the minimum value data item within each
category and sends a
RendererChangeEvent
to all registered
listeners.
- Parameters:
icon
- the icon (null
not permitted).- See Also:
getMinIcon()
drawItem
public void drawItem(java.awt.Graphics2D g2,
CategoryItemRendererState state,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryDataset dataset,
int row,
int column,
int pass)
- Draw a single data item.
- Parameters:
g2
- the graphics device.state
- the renderer state.dataArea
- the area in which the data is drawn.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.
equals
public boolean equals(java.lang.Object obj)
- Tests this instance for equality with an arbitrary object. The icon
fields are NOT included in the test, so this implementation is a little
weak.
- Overrides:
equals
in class AbstractCategoryItemRenderer
- Parameters:
obj
- the object (null
permitted).
- Returns:
- A boolean.
- Since:
- 1.0.7
Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.