Package org.jCharts.properties
Class PieChart2DProperties
- java.lang.Object
-
- org.jCharts.properties.ChartTypeProperties
-
- org.jCharts.properties.PieChart2DProperties
-
- All Implemented Interfaces:
HTMLTestable
public final class PieChart2DProperties extends ChartTypeProperties implements HTMLTestable
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.PaintborderPaintprivate java.awt.StrokeborderStrokestatic java.awt.PaintDEFAULT_BORDER_PAINTstatic java.awt.StrokeDEFAULT_BORDER_STROKEprivate booleanisCurrencyprivate PieLabelTypepieLabelTypeprivate introundingPowerOfTenprivate booleanshowGroupingprivate floattickLengthprivate ChartFontvalueLabelFontprivate floatzeroDegreeOffset
-
Constructor Summary
Constructors Constructor Description PieChart2DProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.PaintgetBorderPaint()java.awt.StrokegetBorderStroke()PieLabelTypegetPieLabelType()floatgetTickLength()ChartFontgetValueLabelFont()intgetValueLabelRoundingPowerOfTen()floatgetZeroDegreeOffset()voidsetBorderPaint(java.awt.Paint paint)voidsetBorderStroke(java.awt.Stroke stroke)voidsetCurrency(boolean currency)voidsetPieLabelType(PieLabelType pieLabelType)Sets the type of label to draw on the PieChart.voidsetRoundingPowerOfTen(int roundingPowerOfTen)voidsetShowGrouping(boolean showGrouping)voidsetTickLength(float tickLength)voidsetValueLabelFont(ChartFont valueLabelFont)Sets the ChartFont used to draw the chart value labels.voidsetZeroDegreeOffset(float zeroDegreeOffset)The offset from zero degrees which the first slice of pie is drawn.booleanshowValueLabelCurrency()booleanshowValueLabelGrouping()voidtoHTML(HTMLGenerator htmlGenerator)Enables the testing routines to display the contents of this Object.voidvalidate(Chart chart)Validates the properties.
-
-
-
Field Detail
-
DEFAULT_BORDER_PAINT
public static final java.awt.Paint DEFAULT_BORDER_PAINT
-
DEFAULT_BORDER_STROKE
public static final java.awt.Stroke DEFAULT_BORDER_STROKE
-
borderPaint
private java.awt.Paint borderPaint
-
borderStroke
private java.awt.Stroke borderStroke
-
zeroDegreeOffset
private float zeroDegreeOffset
-
pieLabelType
private PieLabelType pieLabelType
-
isCurrency
private boolean isCurrency
-
showGrouping
private boolean showGrouping
-
roundingPowerOfTen
private int roundingPowerOfTen
-
valueLabelFont
private ChartFont valueLabelFont
-
tickLength
private float tickLength
-
-
Method Detail
-
setZeroDegreeOffset
public void setZeroDegreeOffset(float zeroDegreeOffset)
The offset from zero degrees which the first slice of pie is drawn. Charts look better to my eye when they do not start at zero degrees, but beauty is in the eye of the beholder.- Parameters:
zeroDegreeOffset-
-
getZeroDegreeOffset
public float getZeroDegreeOffset()
- Returns:
- double
-
getBorderStroke
public java.awt.Stroke getBorderStroke()
- Returns:
- stroke
-
setBorderStroke
public void setBorderStroke(java.awt.Stroke stroke)
- Parameters:
stroke-
-
getBorderPaint
public java.awt.Paint getBorderPaint()
- Returns:
- Paint
-
setBorderPaint
public void setBorderPaint(java.awt.Paint paint)
- Parameters:
paint-
-
getPieLabelType
public PieLabelType getPieLabelType()
- Returns:
-
setPieLabelType
public void setPieLabelType(PieLabelType pieLabelType)
Sets the type of label to draw on the PieChart. The default value is: PieLabelType.NO_LABELS so no labels will be drawn on chart.- Parameters:
pieLabelType-
-
getValueLabelFont
public ChartFont getValueLabelFont()
-
setValueLabelFont
public void setValueLabelFont(ChartFont valueLabelFont)
Sets the ChartFont used to draw the chart value labels.- Parameters:
valueLabelFont-
-
setCurrency
public void setCurrency(boolean currency)
-
setShowGrouping
public void setShowGrouping(boolean showGrouping)
-
setRoundingPowerOfTen
public void setRoundingPowerOfTen(int roundingPowerOfTen)
-
setTickLength
public void setTickLength(float tickLength)
-
getTickLength
public float getTickLength()
-
showValueLabelCurrency
public boolean showValueLabelCurrency()
-
showValueLabelGrouping
public boolean showValueLabelGrouping()
-
getValueLabelRoundingPowerOfTen
public int getValueLabelRoundingPowerOfTen()
-
toHTML
public void toHTML(HTMLGenerator htmlGenerator)
Enables the testing routines to display the contents of this Object.- Specified by:
toHTMLin interfaceHTMLTestable- Parameters:
htmlGenerator-
-
validate
public void validate(Chart chart) throws PropertyException
Validates the properties.- Parameters:
chart-- Throws:
PropertyException
-
-