final public class PieChart2DProperties extends Properties(Code)
A data structure for holding the properties common to all PieChart2D charts.
A PieChart2D object is an enclosed are with a title, pie sectors, pie labels, and a legend.
Pass this to any number of PieChart2D objects.
getPieChart2DNeedsUpdate(PieChart2D pieChart2D) Gets whether this object needs to be updated with new properties.
Parameters: pieChart2D - The object that might need to be updated.
getPieLabelsLinesDotsColor() Returns the color of the dots that exist at the beginning and ending of
the lines relating each pie sector with its particular label.
final public boolean
getPieLabelsLinesDotsExistence() Returns whether dots exist at the beginning and ending of the lines
relating each pie sector with its particular label.
final public int
getPieLabelsLinesDotsThicknessModel() Returns the thickness (ie diameter) of the dots that exist at the
beginning and ending of the lines releating each pie sector with its
particular label for the chart's model size.
final public boolean
getPieLabelsLinesExistence() Returns whether lines relating each pie sector with its particular label exists.
final public int
getPieLabelsLinesThicknessModel() Returns the thickness of the lines relating each pie sector with its
particular label for the model size of the chart.
final public float
getPieLabelsPointsBetweenPieAndLabelGapsDepthRatio() Returns the depth within each gap between each pie sector and label,
from each pie, of the point at which a line coming from a label and a line
coming from a pie, meet.
final public boolean
getPieLabelsPointsGapOffsetExistence() Returns whether the gap between each pie label and a point from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector exists.
final public float
getPieLabelsPointsGapOffsetModelRatio() Gets the ratio on the gap between the pie and the labels, for the gap between the
labels and the labels point.
final public float
getPieLabelsPointsPieSectorsDepthRatio() Returns the depth within each pie sector a point is placed from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector for the chart's model size.
final public int
getPieLabelsType() Returns the type of pie sector labels of the pie chart.
final public int
getPiePreferredSize() Returns the preffered size of the pie in the pie chart.
final public int
getPieSectorLightSource() Gets from which direction the light is coming for shading of the pie sectors.
setPieLabelsExistence(boolean existence) Specifies whether the pie sectors of the pie chart will be labeled.
The labels can be raw numbers or percents.
setPieLabelsLinesColor(Color color) Specifies the color of the lines relating each pie sector with its particular label.
final public void
setPieLabelsLinesDotsColor(Color color) Specifies the color of the dots that exist at the beginning and ending of
the lines relating each pie sector with its particular label.
final public void
setPieLabelsLinesDotsExistence(boolean existence) Specifies whether dots exist at the beginning and ending of the lines
relating each pie sector with its particular label.
final public void
setPieLabelsLinesDotsThicknessModel(int thickness) Specifies the thickness (ie diameter) of the dots that exist at the
beginning and ending of the lines releating each pie sector with its
particular label for the chart's model size.
final public void
setPieLabelsLinesExistence(boolean existence) Specifies whether lines relating each pie sector with its particular label exists.
final public void
setPieLabelsLinesThicknessModel(int thickness) Specifies the thickness of the lines relating each pie sector with its
particular label for the model size of the chart.
final public void
setPieLabelsPointsBetweenPieAndLabelGapsDepthRatio(float ratio) Specifies the depth within each gap between each pie sector and label,
from each pie, of the point at which a line coming from a label and a line
coming from a pie, meet.
final public void
setPieLabelsPointsGapOffsetExistence(boolean existence) Specifies whether the gap between each pie label and a point from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector exists.
final public void
setPieLabelsPointsGapOffsetModelRatio(float ratio) Specifies the ratio on the gap between the pie and the labels, for the gap between the
labels and the labels point.
final public void
setPieLabelsPointsPieSectorsDepthRatio(float ratio) Specifies the depth within each pie sector a point is placed from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector for the chart's model size.
final public void
setPieLabelsType(int type) Specifies the type of pie sector labels of the pie chart.
final public void
setPiePreferredSize(int size) Specifies the preffered size of the pie in the pie chart.
final void
setPieSectorLightSource(int source) Sets from which direction the light is coming for shading of the pie sectors.
validate(boolean debug) Validates the properties of this object.
If debug is true then prints a messages indicating whether each property is valid.
Returns true if all the properties were valid and false otherwise.
Parameters: debug - If true then will print status messages.
Creates a PieChart2DProperties object with property values copied from another object.
The copying is a deep copy.
Parameters: pieChart2DProps - The properties to copy.
Adds a PieChart2D to the set of objects using these properties.
Parameters: pieChart2D - The object to add.
getChartBetweenPieLabelsAndPieGapExistence
final public boolean getChartBetweenPieLabelsAndPieGapExistence()(Code)
Returns whether the gap between each pie label and the pie exists.
If true, the gap exists.
getChartBetweenPieLabelsAndPieGapThicknessModel
final public int getChartBetweenPieLabelsAndPieGapThicknessModel()(Code)
Returns the thickness of the gap between each pie label and the pie
for the chart's model size.
The model thickness of the gap.
getPieChart2DNeedsUpdate
final boolean getPieChart2DNeedsUpdate(PieChart2D pieChart2D)(Code)
Gets whether this object needs to be updated with new properties.
Parameters: pieChart2D - The object that might need to be updated. If true the object needs to be udpated.
getPieLabelsBetweenLabelsGapExistence
final public boolean getPieLabelsBetweenLabelsGapExistence()(Code)
Returns whether a gap between each pie sector label exists.
The gap is applied both vertically and horizontally.
If true, then the gap exists.
getPieLabelsBetweenLabelsGapThicknessModel
final public int getPieLabelsBetweenLabelsGapThicknessModel()(Code)
Returns the thickness of the gap between each pie label for the chart's model size.
The thickness of the gap.
getPieLabelsExistence
final public boolean getPieLabelsExistence()(Code)
Returns whether the pie sectors of the pie chart will be labeled.
The labels can be raw numbers or percents. They encircle the pie.
Methods that specify properties of these labels are setPieLabelsType (int)
and Chart2DProperties.setChartDataLabelsPrecision (int).
If true, the pie sectors will be labeled.
Returns the color of the lines relating each pie sector with its particular label.
The color of the lines.
getPieLabelsLinesDotsColor
final publicColor getPieLabelsLinesDotsColor()(Code)
Returns the color of the dots that exist at the beginning and ending of
the lines relating each pie sector with its particular label.
The color of the dots.
getPieLabelsLinesDotsExistence
final public boolean getPieLabelsLinesDotsExistence()(Code)
Returns whether dots exist at the beginning and ending of the lines
relating each pie sector with its particular label.
If true, then two dots per line will exist.
getPieLabelsLinesDotsThicknessModel
final public int getPieLabelsLinesDotsThicknessModel()(Code)
Returns the thickness (ie diameter) of the dots that exist at the
beginning and ending of the lines releating each pie sector with its
particular label for the chart's model size.
The thickness of the dots.
getPieLabelsLinesExistence
final public boolean getPieLabelsLinesExistence()(Code)
Returns whether lines relating each pie sector with its particular label exists.
If true, then the pie labels lines exist.
getPieLabelsLinesThicknessModel
final public int getPieLabelsLinesThicknessModel()(Code)
Returns the thickness of the lines relating each pie sector with its
particular label for the model size of the chart.
The thickness of the line.
final public float getPieLabelsPointsBetweenPieAndLabelGapsDepthRatio()(Code)
Returns the depth within each gap between each pie sector and label,
from each pie, of the point at which a line coming from a label and a line
coming from a pie, meet.
The depth into the gap where the lines labeling lines meet.
getPieLabelsPointsGapOffsetExistence
final public boolean getPieLabelsPointsGapOffsetExistence()(Code)
Returns whether the gap between each pie label and a point from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector exists.
If true, the gap exists.
getPieLabelsPointsGapOffsetModelRatio
final public float getPieLabelsPointsGapOffsetModelRatio()(Code)
Gets the ratio on the gap between the pie and the labels, for the gap between the
labels and the labels point.
The ratio.
getPieLabelsPointsPieSectorsDepthRatio
final public float getPieLabelsPointsPieSectorsDepthRatio()(Code)
Returns the depth within each pie sector a point is placed from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector for the chart's model size.
The depth into the pie sector to the pie sector depth for the point's placement.
Returns the type of pie sector labels of the pie chart. The possible
types are RAW, PERCENT, and RAW+PERCENT. The format for RAW+PERCENT is
v (p%) where v is a data value and p is a percent value.
The type of the pie labels.
Returns the preffered size of the pie in the pie chart. A pie does not
have a calculable preferred size so one must be explicitly provided in this
method. The size indicates the length of the diameter of the pie.
This length must be >= 10.
The preferred size of the pie.
Gets from which direction the light is coming for shading of the pie sectors.
Uses fields TOP, BOTTOM, LEFT, RIGHT, and NONE.
The direction of the light.
getPieSectorsOutlineColor
final publicColor getPieSectorsOutlineColor()(Code)
Returns the color of the outline of the pie sectors.
The color of the outline of the pie sectors.
getPieSectorsOutlineExistence
final public boolean getPieSectorsOutlineExistence()(Code)
Returns whether the sectors of the pie should have a thin outline.
If true, then the pie will have a thin outline.
Sets all the properties to be the values of another PieChart2DProperties object.
The copying is a deep copy.
Parameters: pieChart2DProps - The properties to copy.
setPieChart2DPropertiesToDefaults
final public void setPieChart2DPropertiesToDefaults()(Code)
Sets all properties to their default values.
setPieLabelsBetweenLabelsGapExistence
final public void setPieLabelsBetweenLabelsGapExistence(boolean existence)(Code)
Specifies whether a gap between each pie sector label exists.
The gap is applied both vertically and horizontally.
Parameters: existence - If true, then the gap exists.
setPieLabelsBetweenLabelsGapThicknessModel
final public void setPieLabelsBetweenLabelsGapThicknessModel(int thickness)(Code)
Specifies the thickness of the gap between each pie label for the chart's
model size.
Parameters: thickness - The thickness of the gap.
setPieLabelsExistence
final public void setPieLabelsExistence(boolean existence)(Code)
Specifies whether the pie sectors of the pie chart will be labeled.
The labels can be raw numbers or percents. They encircle the pie.
Methods that specify properties of these labels are setPieLabelsType (int)
and Chart2DProperties.setChartDataLabelsPrecision (int).
Parameters: existence - If true, the pie sectors will be labeled.
setPieLabelsFontColor
final public void setPieLabelsFontColor(Color color)(Code)
Sets the color of the font of the pie labels.
Parameters: color - The color of the font of the pie labels.
setPieLabelsFontName
final public void setPieLabelsFontName(String name)(Code)
Sets name of the font of the pie labels.
Accepts all values accepted by java.awt.Font.
Parameters: name - The name of the font for the pie labels.
setPieLabelsFontPointModel
final public void setPieLabelsFontPointModel(int point)(Code)
Sets the point of the font of the pie labels for the chart's model size.
Parameters: point - The model font point of the pie labels.
setPieLabelsFontStyle
final public void setPieLabelsFontStyle(int style)(Code)
Sets the style of the font of the pie labels.
Accepts all values that java.awt.Font accepts.
Parameters: style - The style of the font of the pie labels.
setPieLabelsLinesColor
final public void setPieLabelsLinesColor(Color color)(Code)
Specifies the color of the lines relating each pie sector with its particular label.
Parameters: color - The color of the lines.
setPieLabelsLinesDotsColor
final public void setPieLabelsLinesDotsColor(Color color)(Code)
Specifies the color of the dots that exist at the beginning and ending of
the lines relating each pie sector with its particular label.
Parameters: color - The color of the dots.
setPieLabelsLinesDotsExistence
final public void setPieLabelsLinesDotsExistence(boolean existence)(Code)
Specifies whether dots exist at the beginning and ending of the lines
relating each pie sector with its particular label.
Parameters: existence - If true, then two dots per line will exist.
setPieLabelsLinesDotsThicknessModel
final public void setPieLabelsLinesDotsThicknessModel(int thickness)(Code)
Specifies the thickness (ie diameter) of the dots that exist at the
beginning and ending of the lines releating each pie sector with its
particular label for the chart's model size.
Parameters: thickness - The thickness of the dots.
setPieLabelsLinesExistence
final public void setPieLabelsLinesExistence(boolean existence)(Code)
Specifies whether lines relating each pie sector with its particular label exists.
Parameters: existence - If true, then the pie labels lines exist.
setPieLabelsLinesThicknessModel
final public void setPieLabelsLinesThicknessModel(int thickness)(Code)
Specifies the thickness of the lines relating each pie sector with its
particular label for the model size of the chart.
Parameters: thickness - The thickness of the line.
final public void setPieLabelsPointsBetweenPieAndLabelGapsDepthRatio(float ratio)(Code)
Specifies the depth within each gap between each pie sector and label,
from each pie, of the point at which a line coming from a label and a line
coming from a pie, meet.
Parameters: ratio - The depth into the gap where the lines labeling lines meet.
setPieLabelsPointsGapOffsetExistence
final public void setPieLabelsPointsGapOffsetExistence(boolean existence)(Code)
Specifies whether the gap between each pie label and a point from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector exists.
Parameters: existence - If true, the gap exists.
setPieLabelsPointsGapOffsetModelRatio
final public void setPieLabelsPointsGapOffsetModelRatio(float ratio)(Code)
Specifies the ratio on the gap between the pie and the labels, for the gap between the
labels and the labels point.
Parameters: ratio - The ratio.
setPieLabelsPointsPieSectorsDepthRatio
final public void setPieLabelsPointsPieSectorsDepthRatio(float ratio)(Code)
Specifies the depth within each pie sector a point is placed from which a
line may be drawn and/or on which a dot may be placed to relate each label
with a particular pie sector for the chart's model size.
Parameters: ratio - The depth into the pie sector to the pie sector depth forthe point's placement.
setPieLabelsType
final public void setPieLabelsType(int type)(Code)
Specifies the type of pie sector labels of the pie chart. The possible
types are RAW, PERCENT, and RAW+PERCENT. The format for RAW+PERCENT is
v (p%) where v is a data value and p is a percent value.
Parameters: type - The type of the pie labels.
setPiePreferredSize
final public void setPiePreferredSize(int size)(Code)
Specifies the preffered size of the pie in the pie chart. A pie does not
have a calculable preferred size so one must be explicitly provided in this
method. The size indicates the length of the diameter of the pie.
This length must be >= 10.
Parameters: size - The preferred size of the pie.
setPieSectorLightSource
final void setPieSectorLightSource(int source)(Code)
Sets from which direction the light is coming for shading of the pie sectors.
Uses fields TOP, BOTTOM, LEFT, RIGHT, and NONE.
Parameters: source - The direction of the light.
setPieSectorsOutlineColor
final public void setPieSectorsOutlineColor(Color color)(Code)
Specifies the color of the outline of the pie sectors.
Parameters: color - The color of the outline of the pie sectors.
setPieSectorsOutlineExistence
final public void setPieSectorsOutlineExistence(boolean existence)(Code)
Specifies whether the sectors of the pie should have a thin outline.
Parameters: existence - If true, then the pie will have a thin outline.
Validates the properties of this object.
If debug is true then prints a messages indicating whether each property is valid.
Returns true if all the properties were valid and false otherwise.
Parameters: debug - If true then will print status messages. If true then valid.
Methods inherited from net.sourceforge.chart2d.Properties