public class RingPlot extends PiePlot implements Cloneable, Serializable
DEFAULT_INTERIOR_GAP, DEFAULT_LABEL_BACKGROUND_PAINT, DEFAULT_LABEL_FONT, DEFAULT_LABEL_OUTLINE_PAINT, DEFAULT_LABEL_OUTLINE_STROKE, DEFAULT_LABEL_PAINT, DEFAULT_LABEL_SHADOW_PAINT, DEFAULT_MINIMUM_ARC_ANGLE_TO_DRAW, DEFAULT_START_ANGLE, MAX_INTERIOR_GAP
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
Constructor and Description |
---|
RingPlot()
Creates a new plot with a
null dataset. |
RingPlot(PieDataset dataset)
Creates a new plot for the specified dataset.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests this plot for equality with an arbitrary object.
|
String |
getCenterText()
Returns the text to display in the center of the plot when the mode
is
CenterTextMode.FIXED . |
Color |
getCenterTextColor()
Returns the color for the center text.
|
Font |
getCenterTextFont()
Returns the font used to display the center text.
|
Format |
getCenterTextFormatter()
Returns the formatter used to format the center text value for the mode
CenterTextMode.VALUE . |
CenterTextMode |
getCenterTextMode()
Returns the mode for displaying text in the center of the plot.
|
double |
getInnerSeparatorExtension()
Returns the length of the inner extension of the separator line that
is drawn between sections, expressed as a percentage of the depth of
the section.
|
double |
getOuterSeparatorExtension()
Returns the length of the outer extension of the separator line that
is drawn between sections, expressed as a percentage of the depth of
the section.
|
double |
getSectionDepth()
Returns the depth of each section, expressed as a percentage of the
plot radius.
|
Paint |
getSeparatorPaint()
Returns the separator paint.
|
Stroke |
getSeparatorStroke()
Returns the separator stroke.
|
boolean |
getSeparatorsVisible()
Returns a flag that indicates whether or not separators are drawn between
the sections in the chart.
|
PiePlotState |
initialise(Graphics2D g2,
Rectangle2D plotArea,
PiePlot plot,
Integer index,
PlotRenderingInfo info)
Initialises the plot state (which will store the total of all dataset
values, among other things).
|
void |
setCenterText(String text)
Sets the text to display in the center of the plot and sends a
change event to all registered listeners.
|
void |
setCenterTextColor(Color color)
Sets the color for the center text and sends a change event to all
registered listeners.
|
void |
setCenterTextFont(Font font)
Sets the font used to display the center text and sends a change event
to all registered listeners.
|
void |
setCenterTextFormatter(Format formatter)
Sets the formatter used to format the center text value and sends a
change event to all registered listeners.
|
void |
setCenterTextMode(CenterTextMode mode)
Sets the mode for displaying text in the center of the plot and sends
a change event to all registered listeners.
|
void |
setInnerSeparatorExtension(double percent)
Sets the length of the inner extension of the separator line that is
drawn between sections, as a percentage of the depth of the
sections, and sends a change event to all registered listeners.
|
void |
setOuterSeparatorExtension(double percent)
Sets the length of the outer extension of the separator line that is
drawn between sections, as a percentage of the depth of the
sections, and sends a change event to all registered listeners.
|
void |
setSectionDepth(double sectionDepth)
The section depth is given as percentage of the plot radius.
|
void |
setSeparatorPaint(Paint paint)
Sets the paint used to draw the separator between sections and sends a
change event to all registered listeners.
|
void |
setSeparatorStroke(Stroke stroke)
Sets the stroke used to draw the separator between sections and sends
a change event to all registered listeners.
|
void |
setSeparatorsVisible(boolean visible)
Sets the flag that controls whether or not separators are drawn between
the sections in the chart, and sends a change event to all registered
listeners.
|
clearSectionOutlinePaints, clearSectionOutlineStrokes, clearSectionPaints, clone, draw, getAutoPopulateSectionOutlinePaint, getAutoPopulateSectionOutlineStroke, getAutoPopulateSectionPaint, getBaseSectionOutlinePaint, getBaseSectionOutlineStroke, getBaseSectionPaint, getDataset, getDirection, getExplodePercent, getExplodePercent, getIgnoreNullValues, getIgnoreZeroValues, getInteriorGap, getLabelBackgroundPaint, getLabelDistributor, getLabelFont, getLabelGap, getLabelGenerator, getLabelLinkMargin, getLabelLinkPaint, getLabelLinkStroke, getLabelLinkStyle, getLabelLinksVisible, getLabelOutlinePaint, getLabelOutlineStroke, getLabelPadding, getLabelPaint, getLabelShadowPaint, getLegendItems, getLegendItemShape, getLegendLabelGenerator, getLegendLabelToolTipGenerator, getLegendLabelURLGenerator, getMaximumExplodePercent, getMaximumLabelWidth, getMinimumArcAngleToDraw, getPieIndex, getPlotType, getSectionOutlinePaint, getSectionOutlinePaint, getSectionOutlinePaint, getSectionOutlineStroke, getSectionOutlineStroke, getSectionOutlineStroke, getSectionOutlinesVisible, getSectionPaint, getSectionPaint, getSectionPaint, getShadowGenerator, getShadowPaint, getShadowXOffset, getShadowYOffset, getSimpleLabelOffset, getSimpleLabels, getStartAngle, getToolTipGenerator, getURLGenerator, handleMouseWheelRotation, isCircular, setAutoPopulateSectionOutlinePaint, setAutoPopulateSectionOutlineStroke, setAutoPopulateSectionPaint, setBaseSectionOutlinePaint, setBaseSectionOutlineStroke, setBaseSectionPaint, setCircular, setCircular, setDataset, setDirection, setExplodePercent, setExplodePercent, setIgnoreNullValues, setIgnoreZeroValues, setInteriorGap, setLabelBackgroundPaint, setLabelDistributor, setLabelFont, setLabelGap, setLabelGenerator, setLabelLinkMargin, setLabelLinkPaint, setLabelLinkStroke, setLabelLinkStyle, setLabelLinksVisible, setLabelOutlinePaint, setLabelOutlineStroke, setLabelPadding, setLabelPaint, setLabelShadowPaint, setLegendItemShape, setLegendLabelGenerator, setLegendLabelToolTipGenerator, setLegendLabelURLGenerator, setMaximumLabelWidth, setMinimumArcAngleToDraw, setPieIndex, setSectionOutlinePaint, setSectionOutlinePaint, setSectionOutlinePaint, setSectionOutlineStroke, setSectionOutlineStroke, setSectionOutlineStroke, setSectionOutlinesVisible, setSectionPaint, setSectionPaint, setSectionPaint, setShadowGenerator, setShadowPaint, setShadowXOffset, setShadowYOffset, setSimpleLabelOffset, setSimpleLabels, setStartAngle, setToolTipGenerator, setURLGenerator
addChangeListener, annotationChanged, axisChanged, datasetChanged, drawBackground, drawBackgroundImage, drawOutline, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRootPlot, handleClick, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
public RingPlot()
null
dataset.public RingPlot(PieDataset dataset)
dataset
- the dataset (null
permitted).public CenterTextMode getCenterTextMode()
CenterTextMode.NONE
therefore no text
will be displayed by default.null
).public void setCenterTextMode(CenterTextMode mode)
CenterTextMode.FIXED
, the display text will come from the
centerText
attribute (see getCenterText()
).
For CenterTextMode.VALUE
, the center text will be the value from
the first section in the dataset.mode
- the mode (null
not permitted).public String getCenterText()
CenterTextMode.FIXED
.null
).public void setCenterText(String text)
null
, no text will be displayed.text
- the text (null
permitted).public Format getCenterTextFormatter()
CenterTextMode.VALUE
. The default value is
DecimalFormat("0.00");
.null
).public void setCenterTextFormatter(Format formatter)
formatter
- the formatter (null
not permitted).public Font getCenterTextFont()
PiePlot.DEFAULT_LABEL_FONT
.null
).public void setCenterTextFont(Font font)
font
- the font (null
not permitted).public Color getCenterTextColor()
Color.BLACK
.null
).public void setCenterTextColor(Color color)
color
- the color (null
not permitted).public boolean getSeparatorsVisible()
setSeparatorsVisible(boolean)
public void setSeparatorsVisible(boolean visible)
visible
- the flag.getSeparatorsVisible()
public Stroke getSeparatorStroke()
null
).setSeparatorStroke(Stroke)
public void setSeparatorStroke(Stroke stroke)
stroke
- the stroke (null
not permitted).getSeparatorStroke()
public Paint getSeparatorPaint()
null
).setSeparatorPaint(Paint)
public void setSeparatorPaint(Paint paint)
paint
- the paint (null
not permitted).getSeparatorPaint()
public double getInnerSeparatorExtension()
setInnerSeparatorExtension(double)
public void setInnerSeparatorExtension(double percent)
percent
- the percentage.getInnerSeparatorExtension()
,
setOuterSeparatorExtension(double)
public double getOuterSeparatorExtension()
setOuterSeparatorExtension(double)
public void setOuterSeparatorExtension(double percent)
percent
- the percentage.getOuterSeparatorExtension()
public double getSectionDepth()
setSectionDepth(double)
public void setSectionDepth(double sectionDepth)
sectionDepth
- the section depth.getSectionDepth()
public PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea, PiePlot plot, Integer index, PlotRenderingInfo info)
initialise
in class PiePlot
g2
- the graphics device.plotArea
- the plot area (null
not permitted).plot
- the plot.index
- the secondary index (null
for primary
renderer).info
- collects chart rendering information for return to caller.Jas4pp 1.5 © Java Analysis Studio for Particle Physics