|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jfree.chart.renderer.AbstractRenderer org.jfree.chart.renderer.category.AbstractCategoryItemRenderer org.jfree.chart.renderer.category.BoxAndWhiskerRenderer
public class BoxAndWhiskerRenderer
A box-and-whisker renderer. This renderer requires a
BoxAndWhiskerCategoryDataset
and is for use with the
CategoryPlot
class. The example shown here is generated
by the BoxAndWhiskerChartDemo1.java
program included in the
JFreeChart Demo Collection:
Field Summary |
---|
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 | |
---|---|
BoxAndWhiskerRenderer()
Default constructor. |
Method Summary | |
---|---|
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. |
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. |
CategoryItemRendererState |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
int rendererIndex,
PlotRenderingInfo info)
Initialises the renderer. |
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. |
void |
setArtifactPaint(java.awt.Paint paint)
Sets the paint used to color the median and average markers and sends a RendererChangeEvent to all registered listeners. |
void |
setFillBox(boolean flag)
Sets the flag that controls whether or not the box is filled and sends a RendererChangeEvent to all registered listeners. |
void |
setItemMargin(double margin)
Sets the item margin and sends a RendererChangeEvent 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 a RendererChangeEvent
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 a RendererChangeEvent 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 a 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 |
Constructor Detail |
---|
public BoxAndWhiskerRenderer()
Method Detail |
---|
public java.awt.Paint getArtifactPaint()
null
).setArtifactPaint(Paint)
public void setArtifactPaint(java.awt.Paint paint)
RendererChangeEvent
to all registered listeners.
paint
- the paint (null
not permitted).getArtifactPaint()
public boolean getFillBox()
setFillBox(boolean)
public void setFillBox(boolean flag)
RendererChangeEvent
to all registered listeners.
flag
- the flag.getFillBox()
public double getItemMargin()
setItemMargin(double)
public void setItemMargin(double margin)
RendererChangeEvent
to all
registered listeners.
margin
- the margin (a percentage).getItemMargin()
public double getMaximumBarWidth()
setMaximumBarWidth(double)
public void setMaximumBarWidth(double percent)
RendererChangeEvent
to all registered listeners.
percent
- the maximum Bar Width (a percentage).getMaximumBarWidth()
public boolean isMeanVisible()
setMeanVisible(boolean)
public void setMeanVisible(boolean visible)
RendererChangeEvent
to all
registered listeners.
visible
- the new flag value.isMeanVisible()
public boolean isMedianVisible()
setMedianVisible(boolean)
public void setMedianVisible(boolean visible)
RendererChangeEvent
to all
registered listeners.
visible
- the new flag value.isMedianVisible()
public LegendItem getLegendItem(int datasetIndex, int series)
getLegendItem
in interface CategoryItemRenderer
getLegendItem
in class AbstractCategoryItemRenderer
datasetIndex
- the dataset index (zero-based).series
- the series index (zero-based).
null
).AbstractCategoryItemRenderer.getLegendItems()
public Range findRangeBounds(CategoryDataset dataset)
findRangeBounds
in interface CategoryItemRenderer
findRangeBounds
in class AbstractCategoryItemRenderer
dataset
- the dataset.
public CategoryItemRendererState initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)
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(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)
drawItem
in interface CategoryItemRenderer
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 of
BoxAndWhiskerCategoryDataset
).row
- the row index (zero-based).column
- the column index (zero-based).pass
- the pass index.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)
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 of
BoxAndWhiskerCategoryDataset
).row
- the row index (zero-based).column
- the column index (zero-based).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)
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 of
BoxAndWhiskerCategoryDataset
).row
- the row index (zero-based).column
- the column index (zero-based).public boolean equals(java.lang.Object obj)
equals
in class AbstractCategoryItemRenderer
obj
- the object (null
permitted).
true
or false
.
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |