A renderer that draws box-and-whisker items on an
XYPlot
. This
renderer requires a
BoxAndWhiskerXYDataset
).
This renderer does not include any code to calculate the crosshair point.
drawEllipse
protected void drawEllipse(Point2D point,
double oRadius,
Graphics2D g2)
Draws an ellipse to represent an outlier.
point
- the location.oRadius
- the radius.g2
- the graphics device.
drawHighFarOut
protected void drawHighFarOut(double aRadius,
Graphics2D g2,
double xx,
double m)
Draws a triangle to indicate the presence of far out values.
aRadius
- the radius.g2
- the graphics device.xx
- the x value.m
- the max y value.
drawHorizontalItem
public void drawHorizontalItem(Graphics2D g2,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int series,
int item,
CrosshairState crosshairState,
int pass)
Draws the visual representation of a single data item.
g2
- the graphics device.dataArea
- the area within which the plot is being drawn.info
- collects info about the drawing.plot
- the plot (can be used to obtain standard color
information etc).domainAxis
- the domain axis.rangeAxis
- the range axis.dataset
- the dataset.series
- the series index (zero-based).item
- the item index (zero-based).crosshairState
- crosshair information for the plot
(null
permitted).pass
- the pass index.
drawItem
public void drawItem(Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int series,
int item,
CrosshairState crosshairState,
int pass)
Draws the visual representation of a single data item.
- drawItem in interface XYItemRenderer
g2
- the graphics device.state
- the renderer state.dataArea
- the area within which the plot is being drawn.info
- collects info about the drawing.plot
- the plot (can be used to obtain standard color
information etc).domainAxis
- the domain axis.rangeAxis
- the range axis.dataset
- the dataset.series
- the series index (zero-based).item
- the item index (zero-based).crosshairState
- crosshair information for the plot
(null
permitted).pass
- the pass index.
drawLowFarOut
protected void drawLowFarOut(double aRadius,
Graphics2D g2,
double xx,
double m)
Draws a triangle to indicate the presence of far out values.
aRadius
- the radius.g2
- the graphics device.xx
- the x value.m
- the min y value.
drawMultipleEllipse
protected void drawMultipleEllipse(Point2D point,
double boxWidth,
double oRadius,
Graphics2D g2)
Draws two ellipses to represent overlapping outliers.
point
- the location.boxWidth
- the box width.oRadius
- the radius.g2
- the graphics device.
drawVerticalItem
public void drawVerticalItem(Graphics2D g2,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int series,
int item,
CrosshairState crosshairState,
int pass)
Draws the visual representation of a single data item.
g2
- the graphics device.dataArea
- the area within which the plot is being drawn.info
- collects info about the drawing.plot
- the plot (can be used to obtain standard color
information etc).domainAxis
- the domain axis.rangeAxis
- the range axis.dataset
- the dataset.series
- the series index (zero-based).item
- the item index (zero-based).crosshairState
- crosshair information for the plot
(null
permitted).pass
- the pass index.
equals
public boolean equals(Object obj)
Tests this renderer for equality with another object.
- equals in interface AbstractXYItemRenderer
obj
- the object (null
permitted).
getArtifactPaint
public Paint getArtifactPaint()
Returns the paint used to paint the various artifacts such as outliers,
farout symbol, median line and the averages ellipse.
getBoxPaint
public Paint getBoxPaint()
Returns the paint used to fill boxes.
- The paint (possibly
null
).
getBoxWidth
public double getBoxWidth()
Returns the width of each box.
getFillBox
public boolean getFillBox()
Returns the flag that controls whether or not the box is filled.
setArtifactPaint
public void setArtifactPaint(Paint artifactPaint)
Sets the paint used to paint the various artifacts such as outliers,
farout symbol, median line and the averages ellipse.
artifactPaint
- the paint (null
not permitted).
setBoxPaint
public void setBoxPaint(Paint paint)
paint
- the paint (null
permitted).
setBoxWidth
public void setBoxWidth(double width)
Sets the box width and sends a
RendererChangeEvent
to all
registered listeners.
If you set the width to a negative value, the renderer will calculate
the box width automatically based on the space available on the chart.
setFillBox
public void setFillBox(boolean flag)
Sets the flag that controls whether or not the box is filled and sends a
RendererChangeEvent
to all registered listeners.