public static class PiePlot.PieSliceRenderer extends AbstractPointRenderer
Constructor and Description |
---|
PiePlot.PieSliceRenderer(PiePlot plot)
Initializes a new instance with a pie plot object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawValueLabel(DrawingContext context,
PiePlot.Slice slice,
double radius,
Row row,
int col)
Draws the specified value label for the specified shape.
|
double |
getGap()
Returns the width of gaps between the segments relative to the font
size.
|
double |
getInnerRadius()
Returns the value for the inner radius of a pie relative to the
radius set in the plot.
|
double |
getOuterRadius()
Returns the value for the outer radius of a pie relative to the
radius set in the plot.
|
Drawable |
getPoint(PointData data,
java.awt.Shape shape)
Returns the graphical representation to be drawn for the specified data
value.
|
java.awt.Shape |
getPointShape(PointData data)
Returns a
Shape instance that can be used for further
calculations. |
Drawable |
getValue(PointData data,
java.awt.Shape shape)
Returns a graphical representation of the value label to be drawn for
the specified data value.
|
void |
setGap(double gap)
Sets the width of gaps between the segments relative to the font
size.
|
void |
setInnerRadius(double radius)
Sets the value for the inner radius of a pie relative to the radius
set in the plot.
|
void |
setOuterRadius(double radius)
Sets the value for the outer radius of a pie relative to the radius
set in the plot.
|
getColor, getErrorColor, getErrorColumnBottom, getErrorColumnTop, getErrorShape, getErrorStroke, getShape, getValueAlignmentX, getValueAlignmentY, getValueColor, getValueColumn, getValueDistance, getValueFont, getValueFormat, getValueLocation, getValueRotation, isErrorVisible, isValueVisible, setColor, setColor, setErrorColor, setErrorColor, setErrorColumnBottom, setErrorColumnTop, setErrorShape, setErrorStroke, setErrorVisible, setShape, setValueAlignmentX, setValueAlignmentY, setValueColor, setValueColor, setValueColumn, setValueDistance, setValueFont, setValueFormat, setValueLocation, setValueRotation, setValueVisible
public PiePlot.PieSliceRenderer(PiePlot plot)
plot
- Pie plot.public double getOuterRadius()
public void setOuterRadius(double radius)
radius
- Outer radius of a pie relative to the radius of the
plot.public double getInnerRadius()
public void setInnerRadius(double radius)
radius
- Inner radius of a pie relative to the radius of the
plot.public double getGap()
public void setGap(double gap)
gap
- Width of gaps between the segments relative to the font
size.public Drawable getPoint(PointData data, java.awt.Shape shape)
data
- Information on axes, renderers, and values.shape
- Outline that describes the point's shape.public java.awt.Shape getPointShape(PointData data)
Shape
instance that can be used for further
calculations.data
- Information on axes, renderers, and values.protected void drawValueLabel(DrawingContext context, PiePlot.Slice slice, double radius, Row row, int col)
context
- Environment used for drawing.slice
- Pie slice to draw.radius
- Radius of pie slice in view units (e.g. pixels).row
- Data row containing the point.col
- Index of the column that will be projected on the axis.public Drawable getValue(PointData data, java.awt.Shape shape)
PointRenderer
data
- Information on axes, renderers, and values.shape
- Outline that describes the bounds for the value label.