Class BoxAndWhiskerRenderer
- java.lang.Object
-
- org.jfree.chart.renderer.AbstractRenderer
-
- org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
-
- org.jfree.chart.renderer.category.BoxAndWhiskerRenderer
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,LegendItemSource
,CategoryItemRenderer
,PublicCloneable
public class BoxAndWhiskerRenderer extends AbstractCategoryItemRenderer implements java.lang.Cloneable, PublicCloneable, java.io.Serializable
A box-and-whisker renderer. This renderer requires aBoxAndWhiskerCategoryDataset
and is for use with theCategoryPlot
class. The example shown here is generated by theBoxAndWhiskerChartDemo1.java
program included in the JFreeChart Demo Collection:
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Paint
artifactPaint
The color used to paint the median line and average marker.private boolean
fillBox
A flag that controls whether or not the box is filled.private double
itemMargin
The margin between items (boxes) within a category.private double
maximumBarWidth
The maximum bar width as percentage of the available space in the plot.private boolean
maxOutlierVisible
A flag that controls whether or not the maxOutlier is visible.private boolean
meanVisible
A flag that controls whether or not the mean indicator is drawn.private boolean
medianVisible
A flag that controls whether or not the median indicator is drawn.private boolean
minOutlierVisible
A flag that controls whether or not the minOutlier is visible.private static long
serialVersionUID
For serialization.private boolean
useOutlinePaintForWhiskers
A flag that, iftrue
, causes the whiskers to be drawn using the outline paint for the series.private double
whiskerWidth
The width of the whiskers as fraction of the bar width.-
Fields inherited from class org.jfree.chart.renderer.AbstractRenderer
DEFAULT_ITEM_LABEL_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO
-
-
Constructor Summary
Constructors Constructor Description BoxAndWhiskerRenderer()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
drawEllipse(java.awt.geom.Point2D point, double oRadius, java.awt.Graphics2D g2)
Draws a dot to represent an outlier.private void
drawHighFarOut(double aRadius, java.awt.Graphics2D g2, double xx, double m)
Draws a triangle to indicate the presence of far-out values.void
drawHorizontalItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column)
Draws the visual representation of a single data item when the plot has a horizontal orientation.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.private void
drawLowFarOut(double aRadius, java.awt.Graphics2D g2, double xx, double m)
Draws a triangle to indicate the presence of far-out values.private void
drawMultipleEllipse(java.awt.geom.Point2D point, double boxWidth, double oRadius, java.awt.Graphics2D g2)
Draws two dots to represent the average value of more than one outlier.void
drawVerticalItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column)
Draws the visual representation of a single data item when the plot has a vertical orientation.boolean
equals(java.lang.Object obj)
Tests this renderer for equality with an arbitrary object.Range
findRangeBounds(CategoryDataset dataset)
Returns the range of values from the specified dataset that the renderer will require to display all the data.java.awt.Paint
getArtifactPaint()
Returns the paint used to color the median and average markers.boolean
getFillBox()
Returns the flag that controls whether or not the box is filled.double
getItemMargin()
Returns the item margin.LegendItem
getLegendItem(int datasetIndex, int series)
Returns a legend item for a series.double
getMaximumBarWidth()
Returns the maximum bar width as a percentage of the available drawing space.boolean
getUseOutlinePaintForWhiskers()
Returns the flag that, iftrue
, causes the whiskers to be drawn using the series outline paint.double
getWhiskerWidth()
Returns the width of the whiskers as fraction of the bar width.CategoryItemRendererState
initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)
Initialises the renderer.boolean
isMaxOutlierVisible()
Returns the flag that controls whether or not the maximum outlier is draw for each item.boolean
isMeanVisible()
Returns the flag that controls whether or not the mean indicator is draw for each item.boolean
isMedianVisible()
Returns the flag that controls whether or not the median indicator is draw for each item.boolean
isMinOutlierVisible()
Returns the flag that controls whether or not the minimum outlier is draw for each item.private void
readObject(java.io.ObjectInputStream stream)
Provides serialization support.void
setArtifactPaint(java.awt.Paint paint)
Sets the paint used to color the median and average markers and sends aRendererChangeEvent
to all registered listeners.void
setFillBox(boolean flag)
Sets the flag that controls whether or not the box is filled and sends aRendererChangeEvent
to all registered listeners.void
setItemMargin(double margin)
Sets the item margin and sends aRendererChangeEvent
to all registered listeners.void
setMaximumBarWidth(double percent)
Sets the maximum bar width, which is specified as a percentage of the available space for all bars, and sends aRendererChangeEvent
to all registered listeners.void
setMaxOutlierVisible(boolean visible)
Sets the flag that controls whether or not the maximum outlier is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.void
setMeanVisible(boolean visible)
Sets the flag that controls whether or not the mean indicator is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.void
setMedianVisible(boolean visible)
Sets the flag that controls whether or not the median indicator is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.void
setMinOutlierVisible(boolean visible)
Sets the flag that controls whether or not the minimum outlier is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.void
setUseOutlinePaintForWhiskers(boolean flag)
Sets the flag that, iftrue
, causes the whiskers to be drawn using the series outline paint, and sends aRendererChangeEvent
to all registered listeners.void
setWhiskerWidth(double width)
Sets the width of the whiskers as a fraction of the bar width and sends aRendererChangeEvent
to all registered listeners.private void
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.-
Methods inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
addEntity, addItemEntity, beginElementGroup, calculateDomainMarkerTextAnchorPoint, calculateRangeMarkerTextAnchorPoint, clone, createState, drawBackground, drawDomainGridline, drawDomainMarker, drawItemLabel, drawOutline, drawRangeLine, drawRangeMarker, findRangeBounds, getColumnCount, getDefaultItemLabelGenerator, getDefaultItemURLGenerator, getDefaultToolTipGenerator, getDomainAxis, getDrawingSupplier, getItemLabelGenerator, getItemMiddle, getItemURLGenerator, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPassCount, getPlot, getRangeAxis, getRowCount, getSeriesItemLabelGenerator, getSeriesItemURLGenerator, getSeriesToolTipGenerator, getToolTipGenerator, hashCode, setDefaultItemLabelGenerator, setDefaultItemLabelGenerator, setDefaultItemURLGenerator, setDefaultItemURLGenerator, setDefaultToolTipGenerator, setDefaultToolTipGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesItemLabelGenerator, setSeriesItemURLGenerator, setSeriesItemURLGenerator, setSeriesToolTipGenerator, setSeriesToolTipGenerator, updateCrosshairValues
-
Methods inherited from class org.jfree.chart.renderer.AbstractRenderer
addChangeListener, beginElementGroup, calculateLabelAnchorPoint, clearSeriesPaints, clearSeriesStrokes, endElementGroup, fireChangeEvent, getAutoPopulateSeriesFillPaint, getAutoPopulateSeriesOutlinePaint, getAutoPopulateSeriesOutlineStroke, getAutoPopulateSeriesPaint, getAutoPopulateSeriesShape, getAutoPopulateSeriesStroke, getDataBoundsIncludesVisibleSeriesOnly, getDefaultCreateEntities, getDefaultEntityRadius, getDefaultFillPaint, getDefaultItemLabelFont, getDefaultItemLabelPaint, getDefaultItemLabelsVisible, getDefaultLegendShape, getDefaultLegendTextFont, getDefaultLegendTextPaint, getDefaultNegativeItemLabelPosition, getDefaultOutlinePaint, getDefaultOutlineStroke, getDefaultPaint, getDefaultPositiveItemLabelPosition, getDefaultSeriesVisible, getDefaultSeriesVisibleInLegend, getDefaultShape, getDefaultStroke, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelInsets, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendShape, getLegendTextFont, getLegendTextPaint, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisibleInLegend, getTreatLegendShapeAsLine, hasListener, isComputeItemLabelContrastColor, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesPaint, lookupSeriesShape, lookupSeriesStroke, notifyListeners, removeChangeListener, setAutoPopulateSeriesFillPaint, setAutoPopulateSeriesOutlinePaint, setAutoPopulateSeriesOutlineStroke, setAutoPopulateSeriesPaint, setAutoPopulateSeriesShape, setAutoPopulateSeriesStroke, setComputeItemLabelContrastColor, setDataBoundsIncludesVisibleSeriesOnly, setDefaultCreateEntities, setDefaultCreateEntities, setDefaultEntityRadius, setDefaultFillPaint, setDefaultFillPaint, setDefaultItemLabelFont, setDefaultItemLabelFont, setDefaultItemLabelPaint, setDefaultItemLabelPaint, setDefaultItemLabelsVisible, setDefaultItemLabelsVisible, setDefaultLegendShape, setDefaultLegendTextFont, setDefaultLegendTextPaint, setDefaultNegativeItemLabelPosition, setDefaultNegativeItemLabelPosition, setDefaultOutlinePaint, setDefaultOutlinePaint, setDefaultOutlineStroke, setDefaultOutlineStroke, setDefaultPaint, setDefaultPaint, setDefaultPositiveItemLabelPosition, setDefaultPositiveItemLabelPosition, setDefaultSeriesVisible, setDefaultSeriesVisible, setDefaultSeriesVisibleInLegend, setDefaultSeriesVisibleInLegend, setDefaultShape, setDefaultShape, setDefaultStroke, setDefaultStroke, setItemLabelAnchorOffset, setItemLabelInsets, setLegendShape, setLegendTextFont, setLegendTextPaint, 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, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setTreatLegendShapeAsLine
-
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, getDefaultCreateEntities, getDefaultFillPaint, getDefaultItemLabelFont, getDefaultItemLabelPaint, getDefaultItemLabelsVisible, getDefaultNegativeItemLabelPosition, getDefaultOutlinePaint, getDefaultOutlineStroke, getDefaultPaint, getDefaultPositiveItemLabelPosition, getDefaultSeriesVisible, getDefaultSeriesVisibleInLegend, getDefaultShape, getDefaultStroke, getItemCreateEntity, getItemFillPaint, getItemLabelFont, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisibleInLegend, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeChangeListener, setDefaultCreateEntities, setDefaultCreateEntities, setDefaultFillPaint, setDefaultItemLabelFont, setDefaultItemLabelFont, setDefaultItemLabelPaint, setDefaultItemLabelPaint, setDefaultItemLabelsVisible, setDefaultItemLabelsVisible, setDefaultNegativeItemLabelPosition, setDefaultNegativeItemLabelPosition, setDefaultOutlinePaint, setDefaultOutlinePaint, setDefaultOutlineStroke, setDefaultOutlineStroke, setDefaultPaint, setDefaultPaint, setDefaultPositiveItemLabelPosition, setDefaultPositiveItemLabelPosition, setDefaultSeriesVisible, setDefaultSeriesVisible, setDefaultSeriesVisibleInLegend, setDefaultSeriesVisibleInLegend, setDefaultShape, setDefaultShape, setDefaultStroke, setDefaultStroke, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend
-
Methods inherited from interface org.jfree.chart.util.PublicCloneable
clone
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
artifactPaint
private transient java.awt.Paint artifactPaint
The color used to paint the median line and average marker.
-
fillBox
private boolean fillBox
A flag that controls whether or not the box is filled.
-
itemMargin
private double itemMargin
The margin between items (boxes) within a category.
-
maximumBarWidth
private double maximumBarWidth
The maximum bar width as percentage of the available space in the plot. Take care with the encoding - for example, 0.05 is five percent.
-
medianVisible
private boolean medianVisible
A flag that controls whether or not the median indicator is drawn.
-
meanVisible
private boolean meanVisible
A flag that controls whether or not the mean indicator is drawn.
-
maxOutlierVisible
private boolean maxOutlierVisible
A flag that controls whether or not the maxOutlier is visible.
-
minOutlierVisible
private boolean minOutlierVisible
A flag that controls whether or not the minOutlier is visible.
-
useOutlinePaintForWhiskers
private boolean useOutlinePaintForWhiskers
A flag that, iftrue
, causes the whiskers to be drawn using the outline paint for the series. The default value isfalse
and in that case the regular series paint is used.
-
whiskerWidth
private double whiskerWidth
The width of the whiskers as fraction of the bar width.
-
-
Method Detail
-
getArtifactPaint
public java.awt.Paint getArtifactPaint()
Returns the paint used to color the median and average markers.- Returns:
- The paint used to draw the median and average markers (never
null
). - See Also:
setArtifactPaint(Paint)
-
setArtifactPaint
public void setArtifactPaint(java.awt.Paint paint)
Sets the paint used to color the median and average markers and sends aRendererChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getArtifactPaint()
-
getFillBox
public boolean getFillBox()
Returns the flag that controls whether or not the box is filled.- Returns:
- A boolean.
- See Also:
setFillBox(boolean)
-
setFillBox
public void setFillBox(boolean flag)
Sets the flag that controls whether or not the box is filled and sends aRendererChangeEvent
to all registered listeners.- Parameters:
flag
- the flag.- See Also:
getFillBox()
-
getItemMargin
public double getItemMargin()
Returns the item margin. This is a percentage of the available space that is allocated to the space between items in the chart.- Returns:
- The margin.
- See Also:
setItemMargin(double)
-
setItemMargin
public void setItemMargin(double margin)
Sets the item margin and sends aRendererChangeEvent
to all registered listeners.- Parameters:
margin
- the margin (a percentage).- See Also:
getItemMargin()
-
getMaximumBarWidth
public double getMaximumBarWidth()
Returns the maximum bar width as a percentage of the available drawing space. Take care with the encoding, for example 0.10 is ten percent.- Returns:
- The maximum bar width.
- See Also:
setMaximumBarWidth(double)
-
setMaximumBarWidth
public void setMaximumBarWidth(double percent)
Sets the maximum bar width, which is specified as a percentage of the available space for all bars, and sends aRendererChangeEvent
to all registered listeners.- Parameters:
percent
- the maximum bar width (a percentage, where 0.10 is ten percent).- See Also:
getMaximumBarWidth()
-
isMeanVisible
public boolean isMeanVisible()
Returns the flag that controls whether or not the mean indicator is draw for each item.- Returns:
- A boolean.
- See Also:
setMeanVisible(boolean)
-
setMeanVisible
public void setMeanVisible(boolean visible)
Sets the flag that controls whether or not the mean indicator is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.- Parameters:
visible
- the new flag value.- See Also:
isMeanVisible()
-
isMedianVisible
public boolean isMedianVisible()
Returns the flag that controls whether or not the median indicator is draw for each item.- Returns:
- A boolean.
- See Also:
setMedianVisible(boolean)
-
setMedianVisible
public void setMedianVisible(boolean visible)
Sets the flag that controls whether or not the median indicator is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.- Parameters:
visible
- the new flag value.- See Also:
isMedianVisible()
-
isMinOutlierVisible
public boolean isMinOutlierVisible()
Returns the flag that controls whether or not the minimum outlier is draw for each item.- Returns:
- A boolean.
- Since:
- 1.5.2
- See Also:
setMinOutlierVisible(boolean)
-
setMinOutlierVisible
public void setMinOutlierVisible(boolean visible)
Sets the flag that controls whether or not the minimum outlier is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.- Parameters:
visible
- the new flag value.- Since:
- 1.5.2
- See Also:
isMinOutlierVisible()
-
isMaxOutlierVisible
public boolean isMaxOutlierVisible()
Returns the flag that controls whether or not the maximum outlier is draw for each item.- Returns:
- A boolean.
- Since:
- 1.5.2
- See Also:
setMaxOutlierVisible(boolean)
-
setMaxOutlierVisible
public void setMaxOutlierVisible(boolean visible)
Sets the flag that controls whether or not the maximum outlier is drawn for each item, and sends aRendererChangeEvent
to all registered listeners.- Parameters:
visible
- the new flag value.- Since:
- 1.5.2
- See Also:
isMaxOutlierVisible()
-
getUseOutlinePaintForWhiskers
public boolean getUseOutlinePaintForWhiskers()
Returns the flag that, iftrue
, causes the whiskers to be drawn using the series outline paint.- Returns:
- A boolean.
-
setUseOutlinePaintForWhiskers
public void setUseOutlinePaintForWhiskers(boolean flag)
Sets the flag that, iftrue
, causes the whiskers to be drawn using the series outline paint, and sends aRendererChangeEvent
to all registered listeners.- Parameters:
flag
- the new flag value.
-
getWhiskerWidth
public double getWhiskerWidth()
Returns the width of the whiskers as fraction of the bar width.- Returns:
- The width of the whiskers.
- See Also:
setWhiskerWidth(double)
-
setWhiskerWidth
public void setWhiskerWidth(double width)
Sets the width of the whiskers as a fraction of the bar width and sends aRendererChangeEvent
to all registered listeners.- Parameters:
width
- a value between 0 and 1 indicating how wide the whisker is supposed to be compared to the bar.- See Also:
getWhiskerWidth()
,CategoryItemRendererState.getBarWidth()
-
getLegendItem
public LegendItem getLegendItem(int datasetIndex, int series)
Returns a legend item for a series.- Specified by:
getLegendItem
in interfaceCategoryItemRenderer
- Overrides:
getLegendItem
in classAbstractCategoryItemRenderer
- Parameters:
datasetIndex
- the dataset index (zero-based).series
- the series index (zero-based).- Returns:
- The legend item (possibly
null
). - See Also:
AbstractCategoryItemRenderer.getLegendItems()
-
findRangeBounds
public Range findRangeBounds(CategoryDataset dataset)
Returns the range of values from the specified dataset that the renderer will require to display all the data.- Specified by:
findRangeBounds
in interfaceCategoryItemRenderer
- Overrides:
findRangeBounds
in classAbstractCategoryItemRenderer
- Parameters:
dataset
- the dataset.- Returns:
- The range.
-
initialise
public CategoryItemRendererState initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)
Initialises the renderer. This method gets called once at the start of the process of drawing a chart.- Specified by:
initialise
in interfaceCategoryItemRenderer
- Overrides:
initialise
in classAbstractCategoryItemRenderer
- Parameters:
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.- Returns:
- The renderer state.
-
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.- Specified by:
drawItem
in interfaceCategoryItemRenderer
- 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 data (must be an instance ofBoxAndWhiskerCategoryDataset
).row
- the row index (zero-based).column
- the column index (zero-based).pass
- the pass index.
-
drawHorizontalItem
public void drawHorizontalItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column)
Draws the visual representation of a single data item when the plot has a horizontal orientation.- Parameters:
g2
- the graphics device.state
- the renderer state.dataArea
- the area within which the plot is being drawn.plot
- the plot (can be used to obtain standard color information etc).domainAxis
- the domain axis.rangeAxis
- the range axis.dataset
- the dataset (must be an instance ofBoxAndWhiskerCategoryDataset
).row
- the row index (zero-based).column
- the column index (zero-based).
-
drawVerticalItem
public void drawVerticalItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column)
Draws the visual representation of a single data item when the plot has a vertical orientation.- Parameters:
g2
- the graphics device.state
- the renderer state.dataArea
- the area within which the plot is being drawn.plot
- the plot (can be used to obtain standard color information etc).domainAxis
- the domain axis.rangeAxis
- the range axis.dataset
- the dataset (must be an instance ofBoxAndWhiskerCategoryDataset
).row
- the row index (zero-based).column
- the column index (zero-based).
-
drawEllipse
private void drawEllipse(java.awt.geom.Point2D point, double oRadius, java.awt.Graphics2D g2)
Draws a dot to represent an outlier.- Parameters:
point
- the location.oRadius
- the radius.g2
- the graphics device.
-
drawMultipleEllipse
private void drawMultipleEllipse(java.awt.geom.Point2D point, double boxWidth, double oRadius, java.awt.Graphics2D g2)
Draws two dots to represent the average value of more than one outlier.- Parameters:
point
- the locationboxWidth
- the box width.oRadius
- the radius.g2
- the graphics device.
-
drawHighFarOut
private void drawHighFarOut(double aRadius, java.awt.Graphics2D g2, double xx, double m)
Draws a triangle to indicate the presence of far-out values.- Parameters:
aRadius
- the radius.g2
- the graphics device.xx
- the x coordinate.m
- the y coordinate.
-
drawLowFarOut
private void drawLowFarOut(double aRadius, java.awt.Graphics2D g2, double xx, double m)
Draws a triangle to indicate the presence of far-out values.- Parameters:
aRadius
- the radius.g2
- the graphics device.xx
- the x coordinate.m
- the y coordinate.
-
equals
public boolean equals(java.lang.Object obj)
Tests this renderer for equality with an arbitrary object.- Overrides:
equals
in classAbstractCategoryItemRenderer
- Parameters:
obj
- the object (null
permitted).- Returns:
true
orfalse
.
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
Provides serialization support.- Parameters:
stream
- the output stream.- Throws:
java.io.IOException
- if there is an I/O error.
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
Provides serialization support.- Parameters:
stream
- the input stream.- Throws:
java.io.IOException
- if there is an I/O error.java.lang.ClassNotFoundException
- if there is a classpath problem.
-
-