net.sourceforge.chart2d
Class PieChart2DProperties

java.lang.Object
  |
  +--net.sourceforge.chart2d.PieChart2DProperties

public class PieChart2DProperties
extends java.lang.Object

A data structure for holding the properties common to all PieChart2D charts. Pass this to any number of PieChart2D charts to have them configured with these properties.


Field Summary
static boolean CHART_BETWEEN_PIE_LABELS_AND_PIE_GAP_EXISTENCE_DEFAULT
          The default is true.
static int CHART_BETWEEN_PIE_LABELS_AND_PIE_GAP_THICKNESS_MODEL_DEFAULT
          The default is 10.
static java.awt.Color[] CHART_DATASET_COLORS_DEFAULT
          The default is Color[0].
static java.lang.String[] LEGEND_LABELS_TEXTS_DEFAULT
          The default is String[0].
static int PERCENT
          Indicates the pie numbers labels should have percent ratios of the number associated with this lable to the sum of all the numbers of the pie sectors.
static boolean PIE_LABELS_BETWEEN_LABELS_GAP_EXISTENCE_DEFAULT
          The default is true.
static int PIE_LABELS_BETWEEN_LABELS_GAP_THICKNESS_MODEL_DEFAULT
          The default is 4.
static boolean PIE_LABELS_EXISTENCE_DEFAULT
          The default is true.
static java.awt.Color PIE_LABELS_LINES_COLOR_DEFAULT
          The default is Color.black.
static java.awt.Color PIE_LABELS_LINES_DOTS_COLOR_DEFAULT
          The default is Color.black.
static boolean PIE_LABELS_LINES_DOTS_EXISTENCE_DEFAULT
          The default is true.
static int PIE_LABELS_LINES_DOTS_THICKNESS_MODEL_DEFAULT
          The default is 2.
static boolean PIE_LABELS_LINES_EXISTENCE_DEFAULT
          The default is true.
static int PIE_LABELS_LINES_THICKNESS_MODEL_DEFAULT
          The default is 1.
static float PIE_LABELS_POINTS_BETWEEN_PIE_AND_LABEL_GAPS_DEPTH_RATIO_DEFAULT
          The default is .25f.
static boolean PIE_LABELS_POINTS_LABELS_GAP_OFFSET_EXISTENCE_DEFAULT
          The default is true.
static int PIE_LABELS_POINTS_LABELS_GAP_OFFSET_THICKNESS_MODEL_DEFAULT
          The default is 2.
static float PIE_LABELS_POINTS_PIE_SECTORS_DEPTH_RATIO_DEFAULT
          The default is .25f.
static int PIE_LABELS_TYPE_DEFAULT
          The default is RAW + PERCENT.
static int PIE_PREFERRED_SIZE_DEFAULT
          The default is 100.
static java.awt.Color PIE_SECTORS_OUTLINE_COLOR_DEFAULT
          The default is Color.black.
static boolean PIE_SECTORS_OUTLINE_EXISTENCE_DEFAULT
          The default is true.
static int RAW
          Indicates the pie numbers labels should have raw numbers.
static boolean VALIDATE_ON_UPDATE_DEFAULT
          The default is true.
 
Constructor Summary
PieChart2DProperties()
          Creates a PieChart2DProperties object with the documented default values, with a default Chart2DProperties object, and with a default Dataset object.
PieChart2DProperties(Chart2DProperties chart2DProps)
          Creates a PieChart2DProperties object with the documented default values, with the given Chart2DProperties object, and with a default Dataset object.
PieChart2DProperties(Chart2DProperties chart2DProps, Dataset dataset)
          Creates a PieChart2DProperties object with the documented default values, with the given Chart2DProperties object, and with the given Dataset object.
PieChart2DProperties(Dataset dataset)
          Creates a PieChart2DProperties object with the documented default values, with a default Chart2DProperties object, and with the given Dataset object.
PieChart2DProperties(PieChart2DProperties pieChart2DProps)
          Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with a default Chart2DProperties object, and with a default Dataset object.
PieChart2DProperties(PieChart2DProperties pieChart2DProps, Chart2DProperties chart2DProps)
          Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with the given Chart2DProperties object, and with a default Dataset object.
PieChart2DProperties(PieChart2DProperties pieChart2DProps, Chart2DProperties chart2DProps, Dataset dataset)
          Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with the given Chart2DProperties object, and with the given Dataset object.
PieChart2DProperties(PieChart2DProperties pieChart2DProps, Dataset dataset)
          Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with a default Chart2DProperties object, and with the given Dataset object.
 
Method Summary
(package private)  void addPieChart2D(PieChart2D pieChart2D)
          Adds a PieChart2D object to the set of objects associated with this properties object.
 Chart2DProperties getChart2DProperties()
          Returns the Chart2DProperties to use.
 boolean getChartBetweenPieLabelsAndPieGapExistence()
          Returns whether the gap between each pie label and the pie exists.
 int getChartBetweenPieLabelsAndPieGapThicknessModel()
          Returns the thickness of the gap between each pie label and the pie for the chart's model size.
 java.awt.Color[] getChartDatasetColors()
          Returns the colors of the pie sectors and/or legend bullets.
 Dataset getDataset()
          Returns the data set for the pie chart.
 java.lang.String[] getLegendLabelsTexts()
          Returns the legend labels texts.
(package private)  boolean getPieChart2DNeedsUpdate(PieChart2D pieChart2D)
          Gets whether any properties have changed since the PieChart2D object's last update.
 java.util.Vector getPieChart2DVector()
          Returns the vector of PieChart2D objects that are using this object.
 boolean getPieLabelsBetweenLabelsGapExistence()
          Returns whether a gap between each pie sector label exists.
 int getPieLabelsBetweenLabelsGapThicknessModel()
          Returns the thickness of the gap between each pie label for the chart's model size.
 boolean getPieLabelsExistence()
          Returns whether the pie sectors of the pie chart will be labeled.
 java.awt.Color getPieLabelsLinesColor()
          Returns the color of the lines relating each pie sector with its particular label.
 java.awt.Color 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.
 boolean getPieLabelsLinesDotsExistence()
          Returns whether dots exist at the beginning and ending of the lines relating each pie sector with its particular label.
 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.
 boolean getPieLabelsLinesExistence()
          Returns whether lines relating each pie sector with its particular label exists.
 int getPieLabelsLinesThicknessModel()
          Returns the thickness of the lines relating each pie sector with its particular label for the model size of the chart.
 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.
 boolean getPieLabelsPointsLabelsGapOffsetExistence()
          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.
 int getPieLabelsPointsLabelsGapOffsetThicknessModel()
          Returns 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 for the chart's model size.
 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.
 int getPieLabelsType()
          Returns the type of pie sector labels of the pie chart.
 int getPiePreferredSize()
          Returns the preffered size of the pie in the pie chart.
 java.awt.Color getPieSectorsOutlineColor()
          Returns the color of the outline of the pie sectors.
 boolean getPieSectorsOutlineExistence()
          Returns whether the sectors of the pie should have a thin outline.
 boolean getValidateOnUpdate()
          Returns whether the properties should be validated whenever a chart is to be updated with a changed property.
(package private)  void removePieChart2D(PieChart2D pieChart2D)
          Removes a PieChart2D object from the set of objects associated with this properties object.
 void setChart2DProperties(Chart2DProperties chart2DProps)
          Specifies the Chart2DProperties object.
 void setChartBetweenPieLabelsAndPieGapExistence(boolean existence)
          Specifies whether the gap between each pie label and the pie exists.
 void setChartBetweenPieLabelsAndPieGapThicknessModel(int thickness)
          Specifies the thickness of the gap between each pie label and the pie for the chart's model size.
 void setChartDatasetColors(java.awt.Color[] colors)
          Specifies the colors of the pie sectors and/or legend bullets.
 void setDataset(Dataset dataset)
          Specifies the dataset to use for this pie chart.
 void setLegendLabelsTexts(java.lang.String[] texts)
          Specifies the legend labels texts.
 void setPieChart2DProperties(PieChart2DProperties pieChart2DProps)
          Sets all the properties to be values (deep) copied from another PieChart2DProperties.
 void setPieChart2DPropertiesToDefaults()
          Sets all properties to their default values.
 void setPieLabelsBetweenLabelsGapExistence(boolean existence)
          Specifies whether a gap between each pie sector label exists.
 void setPieLabelsBetweenLabelsGapThicknessModel(int thickness)
          Specifies the thickness of the gap between each pie label for the chart's model size.
 void setPieLabelsExistence(boolean existence)
          Specifies whether the pie sectors of the pie chart will be labeled.
 void setPieLabelsLinesColor(java.awt.Color color)
          Specifies the color of the lines relating each pie sector with its particular label.
 void setPieLabelsLinesDotsColor(java.awt.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.
 void setPieLabelsLinesDotsExistence(boolean existence)
          Specifies whether dots exist at the beginning and ending of the lines relating each pie sector with its particular label.
 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.
 void setPieLabelsLinesExistence(boolean existence)
          Specifies whether lines relating each pie sector with its particular label exists.
 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.
 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.
 void setPieLabelsPointsLabelsGapOffsetExistence(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.
 void setPieLabelsPointsLabelsGapOffsetThicknessModel(int thickness)
          Specifies 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 for the chart's model size.
 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.
 void setPieLabelsType(int type)
          Specifies the type of pie sector labels of the pie chart.
 void setPiePreferredSize(int size)
          Specifies the preffered size of the pie in the pie chart.
 void setPieSectorsOutlineColor(java.awt.Color color)
          Specifies the color of the outline of the pie sectors.
 void setPieSectorsOutlineExistence(boolean existence)
          Specifies whether the sectors of the pie should have a thin outline.
 void setValidateOnUpdate(boolean validate)
          Any time a property is changed after the properties are added to a Chart2D, then the Chart2D is updated with the new properties the next time a method of Chart2D's is called.
(package private)  void updatePieChart2D(PieChart2D pieChart2D)
          Updates the properties of this PieChart2D with these properties.
 boolean validate(boolean debug)
          Returns true if the properties are valid.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RAW

public static final int RAW
Indicates the pie numbers labels should have raw numbers. The format and accuracy of these raw numbers are specified through the Chart2DProperties method, setChartDataLabelsPrecision (int). RAW is passed as a parameter to the mehod, setNumbersLabelsType (int), of this class. It may be included with PERCENT (ie RAW + PERCENT) to indicate that pie numbers labels should have both a raw number and the percent ratio this number is to the sum of all the numbers for the pie sectors.

PERCENT

public static final int PERCENT
Indicates the pie numbers labels should have percent ratios of the number associated with this lable to the sum of all the numbers of the pie sectors. It may be included with RAW (ie RAW + PERCENT) to indicate that pie numbers labels should have both a raw number and the percent ratio.

CHART_DATASET_COLORS_DEFAULT

public static final java.awt.Color[] CHART_DATASET_COLORS_DEFAULT
The default is Color[0].

CHART_BETWEEN_PIE_LABELS_AND_PIE_GAP_EXISTENCE_DEFAULT

public static final boolean CHART_BETWEEN_PIE_LABELS_AND_PIE_GAP_EXISTENCE_DEFAULT
The default is true.

CHART_BETWEEN_PIE_LABELS_AND_PIE_GAP_THICKNESS_MODEL_DEFAULT

public static final int CHART_BETWEEN_PIE_LABELS_AND_PIE_GAP_THICKNESS_MODEL_DEFAULT
The default is 10.

LEGEND_LABELS_TEXTS_DEFAULT

public static final java.lang.String[] LEGEND_LABELS_TEXTS_DEFAULT
The default is String[0].

PIE_PREFERRED_SIZE_DEFAULT

public static final int PIE_PREFERRED_SIZE_DEFAULT
The default is 100.

PIE_SECTORS_OUTLINE_EXISTENCE_DEFAULT

public static final boolean PIE_SECTORS_OUTLINE_EXISTENCE_DEFAULT
The default is true.

PIE_SECTORS_OUTLINE_COLOR_DEFAULT

public static final java.awt.Color PIE_SECTORS_OUTLINE_COLOR_DEFAULT
The default is Color.black.

PIE_LABELS_EXISTENCE_DEFAULT

public static final boolean PIE_LABELS_EXISTENCE_DEFAULT
The default is true.

PIE_LABELS_TYPE_DEFAULT

public static final int PIE_LABELS_TYPE_DEFAULT
The default is RAW + PERCENT.

PIE_LABELS_BETWEEN_LABELS_GAP_EXISTENCE_DEFAULT

public static final boolean PIE_LABELS_BETWEEN_LABELS_GAP_EXISTENCE_DEFAULT
The default is true.

PIE_LABELS_BETWEEN_LABELS_GAP_THICKNESS_MODEL_DEFAULT

public static final int PIE_LABELS_BETWEEN_LABELS_GAP_THICKNESS_MODEL_DEFAULT
The default is 4.

PIE_LABELS_POINTS_LABELS_GAP_OFFSET_EXISTENCE_DEFAULT

public static final boolean PIE_LABELS_POINTS_LABELS_GAP_OFFSET_EXISTENCE_DEFAULT
The default is true.

PIE_LABELS_POINTS_LABELS_GAP_OFFSET_THICKNESS_MODEL_DEFAULT

public static final int PIE_LABELS_POINTS_LABELS_GAP_OFFSET_THICKNESS_MODEL_DEFAULT
The default is 2.

PIE_LABELS_POINTS_PIE_SECTORS_DEPTH_RATIO_DEFAULT

public static final float PIE_LABELS_POINTS_PIE_SECTORS_DEPTH_RATIO_DEFAULT
The default is .25f.

PIE_LABELS_POINTS_BETWEEN_PIE_AND_LABEL_GAPS_DEPTH_RATIO_DEFAULT

public static final float PIE_LABELS_POINTS_BETWEEN_PIE_AND_LABEL_GAPS_DEPTH_RATIO_DEFAULT
The default is .25f.

PIE_LABELS_LINES_EXISTENCE_DEFAULT

public static final boolean PIE_LABELS_LINES_EXISTENCE_DEFAULT
The default is true.

PIE_LABELS_LINES_THICKNESS_MODEL_DEFAULT

public static final int PIE_LABELS_LINES_THICKNESS_MODEL_DEFAULT
The default is 1.

PIE_LABELS_LINES_COLOR_DEFAULT

public static final java.awt.Color PIE_LABELS_LINES_COLOR_DEFAULT
The default is Color.black.

PIE_LABELS_LINES_DOTS_EXISTENCE_DEFAULT

public static final boolean PIE_LABELS_LINES_DOTS_EXISTENCE_DEFAULT
The default is true.

PIE_LABELS_LINES_DOTS_THICKNESS_MODEL_DEFAULT

public static final int PIE_LABELS_LINES_DOTS_THICKNESS_MODEL_DEFAULT
The default is 2.

PIE_LABELS_LINES_DOTS_COLOR_DEFAULT

public static final java.awt.Color PIE_LABELS_LINES_DOTS_COLOR_DEFAULT
The default is Color.black.

VALIDATE_ON_UPDATE_DEFAULT

public static final boolean VALIDATE_ON_UPDATE_DEFAULT
The default is true.
Constructor Detail

PieChart2DProperties

public PieChart2DProperties()
Creates a PieChart2DProperties object with the documented default values, with a default Chart2DProperties object, and with a default Dataset object.

PieChart2DProperties

public PieChart2DProperties(PieChart2DProperties pieChart2DProps)
Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with a default Chart2DProperties object, and with a default Dataset object.

PieChart2DProperties

public PieChart2DProperties(Chart2DProperties chart2DProps)
Creates a PieChart2DProperties object with the documented default values, with the given Chart2DProperties object, and with a default Dataset object.

PieChart2DProperties

public PieChart2DProperties(Dataset dataset)
Creates a PieChart2DProperties object with the documented default values, with a default Chart2DProperties object, and with the given Dataset object.

PieChart2DProperties

public PieChart2DProperties(Chart2DProperties chart2DProps,
                            Dataset dataset)
Creates a PieChart2DProperties object with the documented default values, with the given Chart2DProperties object, and with the given Dataset object.

PieChart2DProperties

public PieChart2DProperties(PieChart2DProperties pieChart2DProps,
                            Chart2DProperties chart2DProps)
Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with the given Chart2DProperties object, and with a default Dataset object.

PieChart2DProperties

public PieChart2DProperties(PieChart2DProperties pieChart2DProps,
                            Dataset dataset)
Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with a default Chart2DProperties object, and with the given Dataset object.

PieChart2DProperties

public PieChart2DProperties(PieChart2DProperties pieChart2DProps,
                            Chart2DProperties chart2DProps,
                            Dataset dataset)
Creates a PieChart2DProperties object with property values (deep) copied from another PieChart2DProperties object, with the given Chart2DProperties object, and with the given Dataset object.
Method Detail

setPieChart2DPropertiesToDefaults

public void setPieChart2DPropertiesToDefaults()
Sets all properties to their default values.

setPieChart2DProperties

public void setPieChart2DProperties(PieChart2DProperties pieChart2DProps)
Sets all the properties to be values (deep) copied from another PieChart2DProperties. Leaves the Chart2DProperties and Dataset unchanged.

setChart2DProperties

public void setChart2DProperties(Chart2DProperties chart2DProps)
Specifies the Chart2DProperties object. Does not copy.
Parameters:
chart2DProps - The Chart2DProperties object to use.

setDataset

public void setDataset(Dataset dataset)
Specifies the dataset to use for this pie chart. Does not copy it.
Parameters:
dataset - The dataset to use.

setChartDatasetColors

public void setChartDatasetColors(java.awt.Color[] colors)
Specifies the colors of the pie sectors and/or legend bullets. Thes colors will be used iff Chart2DProperties.setChartDatasetsAutoColor (false).
Parameters:
colors - The colors of the pie sectors and/or legend bullets.

setChartBetweenPieLabelsAndPieGapExistence

public void setChartBetweenPieLabelsAndPieGapExistence(boolean existence)
Specifies whether the gap between each pie label and the pie exists.
Parameters:
existence - If true, the gap exists.

setChartBetweenPieLabelsAndPieGapThicknessModel

public void setChartBetweenPieLabelsAndPieGapThicknessModel(int thickness)
Specifies the thickness of the gap between each pie label and the pie for the chart's model size.
Parameters:
int - The model thickness of the gap.

setLegendLabelsTexts

public void setLegendLabelsTexts(java.lang.String[] texts)
Specifies the legend labels texts. The ith data value in the data set will correspond to the ith legend text.
Parameters:
texts - The legend labels texts.

setPiePreferredSize

public void setPiePreferredSize(int size)
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.

setPieSectorsOutlineExistence

public void setPieSectorsOutlineExistence(boolean existence)
Specifies whether the sectors of the pie should have a thin outline.
Parameters:
existence - If true, then the pie will have a thin outline.

setPieSectorsOutlineColor

public void setPieSectorsOutlineColor(java.awt.Color color)
Specifies the color of the outline of the pie sectors.
Parameters:
color - The color of the outline of the pie sectors.

setPieLabelsExistence

public void setPieLabelsExistence(boolean existence)
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.

setPieLabelsType

public void setPieLabelsType(int type)
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.

setPieLabelsBetweenLabelsGapExistence

public void setPieLabelsBetweenLabelsGapExistence(boolean existence)
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

public void setPieLabelsBetweenLabelsGapThicknessModel(int thickness)
Specifies the thickness of the gap between each pie label for the chart's model size.
Parameters:
thickness - The thickness of the gap.

setPieLabelsPointsLabelsGapOffsetExistence

public void setPieLabelsPointsLabelsGapOffsetExistence(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.
Parameters:
existence - If true, the gap exists.

setPieLabelsPointsLabelsGapOffsetThicknessModel

public void setPieLabelsPointsLabelsGapOffsetThicknessModel(int thickness)
Specifies 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 for the chart's model size.
Parameters:
thickness - The thickness of the gap.

setPieLabelsPointsPieSectorsDepthRatio

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.
Parameters:
ratio - The depth into the pie sector to the pie sector depth for the point's placement.

setPieLabelsPointsBetweenPieAndLabelGapsDepthRatio

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.
Parameters:
ratio - The depth into the gap where the lines labeling lines meet.

setPieLabelsLinesExistence

public void setPieLabelsLinesExistence(boolean existence)
Specifies whether lines relating each pie sector with its particular label exists.
Parameters:
existence - If true, then the pie labels lines exist.

setPieLabelsLinesThicknessModel

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.
Parameters:
thickness - The thickness of the line.

setPieLabelsLinesColor

public void setPieLabelsLinesColor(java.awt.Color color)
Specifies the color of the lines relating each pie sector with its particular label.
Parameters:
color - The color of the lines.

setPieLabelsLinesDotsExistence

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.
Parameters:
existence - If true, then two dots per line will exist.

setPieLabelsLinesDotsThicknessModel

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.
Parameters:
thickness - The thickness of the dots.

setPieLabelsLinesDotsColor

public void setPieLabelsLinesDotsColor(java.awt.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.
Parameters:
color - The color of the dots.

setValidateOnUpdate

public void setValidateOnUpdate(boolean validate)
Any time a property is changed after the properties are added to a Chart2D, then the Chart2D is updated with the new properties the next time a method of Chart2D's is called. If the parameter, validate, is true then the properties will be validated using the validate method upon each update.
Parameters:
validate - If true, then a property change triggers validation of all properties the next time a property is needed by a Chart2D.

getChart2DProperties

public Chart2DProperties getChart2DProperties()
Returns the Chart2DProperties to use.
Returns:
Chart2DProperties The Chart2DProperties to use.

getDataset

public Dataset getDataset()
Returns the data set for the pie chart.
Returns:
float[] The data set for the pie chart.

getPieChart2DVector

public java.util.Vector getPieChart2DVector()
Returns the vector of PieChart2D objects that are using this object.
Returns:
Vector The associated PieChart2D objects.

getChartDatasetColors

public java.awt.Color[] getChartDatasetColors()
Returns the colors of the pie sectors and/or legend bullets. Thes colors will be used iff Chart2DProperties.setChartDatasetsAutoColor (false).
Returns:
Color[] The colors of the pie sectors and/or legend bullets.

getChartBetweenPieLabelsAndPieGapExistence

public boolean getChartBetweenPieLabelsAndPieGapExistence()
Returns whether the gap between each pie label and the pie exists.
Returns:
existence If true, the gap exists.

getChartBetweenPieLabelsAndPieGapThicknessModel

public int getChartBetweenPieLabelsAndPieGapThicknessModel()
Returns the thickness of the gap between each pie label and the pie for the chart's model size.
Returns:
int The model thickness of the gap.

getLegendLabelsTexts

public java.lang.String[] getLegendLabelsTexts()
Returns the legend labels texts. The ith data value in the data set will correspond to the ith legend text.
Returns:
String[] The legend labels texts.

getPiePreferredSize

public int getPiePreferredSize()
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.
Returns:
int size The preferred size of the pie.

getPieSectorsOutlineExistence

public boolean getPieSectorsOutlineExistence()
Returns whether the sectors of the pie should have a thin outline.
Returns:
boolean If true, then the pie will have a thin outline.

getPieSectorsOutlineColor

public java.awt.Color getPieSectorsOutlineColor()
Returns the color of the outline of the pie sectors.
Returns:
Color The color of the outline of the pie sectors.

getPieLabelsExistence

public boolean getPieLabelsExistence()
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).
Returns:
boolean If true, the pie sectors will be labeled.

getPieLabelsType

public int getPieLabelsType()
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.
Returns:
int The type of the pie labels.

getPieLabelsBetweenLabelsGapExistence

public boolean getPieLabelsBetweenLabelsGapExistence()
Returns whether a gap between each pie sector label exists. The gap is applied both vertically and horizontally.
Returns:
boolean If true, then the gap exists.

getPieLabelsBetweenLabelsGapThicknessModel

public int getPieLabelsBetweenLabelsGapThicknessModel()
Returns the thickness of the gap between each pie label for the chart's model size.
Returns:
int The thickness of the gap.

getPieLabelsPointsLabelsGapOffsetExistence

public boolean getPieLabelsPointsLabelsGapOffsetExistence()
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.
Returns:
boolean If true, the gap exists.

getPieLabelsPointsLabelsGapOffsetThicknessModel

public int getPieLabelsPointsLabelsGapOffsetThicknessModel()
Returns 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 for the chart's model size.
Returns:
int The thickness of the gap.

getPieLabelsPointsPieSectorsDepthRatio

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.
Returns:
float The depth into the pie sector to the pie sector depth for the point's placement.

getPieLabelsPointsBetweenPieAndLabelGapsDepthRatio

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.
Parameters:
float - The depth into the gap where the lines labeling lines meet.

getPieLabelsLinesExistence

public boolean getPieLabelsLinesExistence()
Returns whether lines relating each pie sector with its particular label exists.
Returns:
boolean If true, then the pie labels lines exist.

getPieLabelsLinesThicknessModel

public int getPieLabelsLinesThicknessModel()
Returns the thickness of the lines relating each pie sector with its particular label for the model size of the chart.
Returns:
int The thickness of the line.

getPieLabelsLinesColor

public java.awt.Color getPieLabelsLinesColor()
Returns the color of the lines relating each pie sector with its particular label.
Returns:
Color The color of the lines.

getPieLabelsLinesDotsExistence

public boolean getPieLabelsLinesDotsExistence()
Returns whether dots exist at the beginning and ending of the lines relating each pie sector with its particular label.
Returns:
boolean If true, then two dots per line will exist.

getPieLabelsLinesDotsThicknessModel

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.
Returns:
int The thickness of the dots.

getPieLabelsLinesDotsColor

public java.awt.Color 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.
Parameters:
Color - The color of the dots.

getValidateOnUpdate

public boolean getValidateOnUpdate()
Returns whether the properties should be validated whenever a chart is to be updated with a changed property.
Returns:
boolean If true, then the properties will be validated every time they are used to update a chart.

validate

public boolean validate(boolean debug)
Returns true if the properties are valid. For example if a negative number is passed as a model thickness, this method will return false. If the parameter, debug, is true then a message will be printed trying to indicate which properties if any are invalid and why. If a property is invalid, then the property is set to its default. This will not trigger validation of the Chart2DProperties and Dataset.
Parameters:
debug - If true, then debug messages will be printed.
Returns:
boolean If true, then the properties are valid.

getPieChart2DNeedsUpdate

boolean getPieChart2DNeedsUpdate(PieChart2D pieChart2D)
Gets whether any properties have changed since the PieChart2D object's last update.
Parameters:
pieChart2D - The object that might need to be updated.
Returns:
boolean If true, the object needs to be udpated.

updatePieChart2D

void updatePieChart2D(PieChart2D pieChart2D)
Updates the properties of this PieChart2D with these properties.
Parameters:
pieChart2D - The PieChart2D object to update the properties of.

addPieChart2D

void addPieChart2D(PieChart2D pieChart2D)
Adds a PieChart2D object to the set of objects associated with this properties object.
Parameters:
pieChart2D - The object to use these properties.

removePieChart2D

void removePieChart2D(PieChart2D pieChart2D)
Removes a PieChart2D object from the set of objects associated with this properties object.
Parameters:
pieChart2D - The object to not use these properties.