public class MinMaxCategoryRenderer extends AbstractCategoryItemRenderer
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:

| Modifier and Type | Field and Description |
|---|---|
private java.awt.Paint |
groupPaint
The paint of the line between the minimum value and the maximum value.
|
private java.awt.Stroke |
groupStroke
The stroke of the line between the minimum value and the maximum value.
|
private int |
lastCategory
The last category.
|
private double |
max
The maximum.
|
private javax.swing.Icon |
maxIcon
The icon used to indicate the maximum value.
|
private double |
min
The minimum.
|
private javax.swing.Icon |
minIcon
The icon used to indicate the minimum value.
|
private javax.swing.Icon |
objectIcon
The icon used to indicate the values.
|
private boolean |
plotLines
A flag indicating whether or not lines are drawn between XY points.
|
private static long |
serialVersionUID
For serialization.
|
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO| Constructor and Description |
|---|
MinMaxCategoryRenderer()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
private javax.swing.Icon |
getIcon(java.awt.Shape shape,
boolean fill,
boolean outline)
Returns an icon from a shape.
|
private javax.swing.Icon |
getIcon(java.awt.Shape shape,
java.awt.Paint fillPaint,
java.awt.Paint outlinePaint)
Returns an icon.
|
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.
|
private void |
readObject(java.io.ObjectInputStream stream)
Provides serialization support.
|
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. |
private void |
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.
|
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, updateCrosshairValuesaddChangeListener, 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, getTreatLegendShapeAsLine, 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, setTreatLegendShapeAsLinefinalize, getClass, notify, notifyAll, toString, wait, wait, waitaddChangeListener, 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, setStrokeprivate static final long serialVersionUID
private boolean plotLines
private transient java.awt.Paint groupPaint
private transient java.awt.Stroke groupStroke
private transient javax.swing.Icon minIcon
private transient javax.swing.Icon maxIcon
private transient javax.swing.Icon objectIcon
private int lastCategory
private double min
private double max
public boolean isDrawLines()
setDrawLines(boolean)public void setDrawLines(boolean draw)
RendererChangeEvent to
all registered listeners.draw - the new value of the flag.isDrawLines()public java.awt.Paint getGroupPaint()
null).setGroupPaint(Paint)public void setGroupPaint(java.awt.Paint paint)
RendererChangeEvent to
all registered listeners.paint - the paint (null not permitted).getGroupPaint()public java.awt.Stroke getGroupStroke()
null).setGroupStroke(Stroke)public void setGroupStroke(java.awt.Stroke stroke)
RendererChangeEvent to all registered
listeners.stroke - the new stroke (null not permitted).public javax.swing.Icon getObjectIcon()
null).setObjectIcon(Icon)public void setObjectIcon(javax.swing.Icon icon)
RendererChangeEvent to all registered listeners.icon - the icon.getObjectIcon()public javax.swing.Icon getMaxIcon()
null).setMaxIcon(Icon)public void setMaxIcon(javax.swing.Icon icon)
RendererChangeEvent to all registered
listeners.icon - the icon (null not permitted).getMaxIcon()public javax.swing.Icon getMinIcon()
null).setMinIcon(Icon)public void setMinIcon(javax.swing.Icon icon)
RendererChangeEvent to all registered
listeners.icon - the icon (null not permitted).getMinIcon()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)
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.public boolean equals(java.lang.Object obj)
equals in class AbstractCategoryItemRendererobj - the object (null permitted).private javax.swing.Icon getIcon(java.awt.Shape shape,
java.awt.Paint fillPaint,
java.awt.Paint outlinePaint)
shape - the shape.fillPaint - the fill paint.outlinePaint - the outline paint.private javax.swing.Icon getIcon(java.awt.Shape shape,
boolean fill,
boolean outline)
shape - the shape.fill - the fill flag.outline - the outline flag.private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
stream - the output stream.java.io.IOException - if there is an I/O error.private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - the input stream.java.io.IOException - if there is an I/O error.java.lang.ClassNotFoundException - if there is a classpath problem.