| java.lang.Object net.sourceforge.chart2d.Area net.sourceforge.chart2d.FontArea net.sourceforge.chart2d.TitledArea net.sourceforge.chart2d.ChartArea
All known Subclasses: net.sourceforge.chart2d.PieChartArea, net.sourceforge.chart2d.GraphChartArea,
ChartArea | class ChartArea extends TitledArea (Code) | | A container containing information and components for all charts.
|
Field Summary | |
final static int | DEFAULT_FLOAT Used by setLabelsPrecisionNum (int num). | final static int | MAX_FLOAT Used by setLabelsPrecisionNum (int num). | final static int | MAX_INTEGER Used by setLabelsPrecisionNum (int num). |
Constructor Summary | |
| ChartArea() Creates a Chart Area with the default values. |
Method Summary | |
final boolean | getAutoSetLayoutRatios() Returns whether upon the next painting, the layout ratios distributing
the max size of the space between the components, should be set to their
ideal values based on particulars of the chart. | final boolean | getBetweenChartAndLegendGapExistence() Returns whether the gap between the chart and the legend exists. | final int | getBetweenChartAndLegendGapThicknessModel() Returns the thickness of the gap between the chart and the legend for the
chart's model size. | final boolean | getChartAreaNeedsUpdate() Indicates whether some property of this class has changed. | final static float[] | getDataCategoryTotals(float[][] datasets) Returns the total amount of data in for each data category. | final Color[] | getDatasetColors() Returns the colors the auto charting algorithm chose or your custom colors. | final Color[] | getDatasetColors(int begin, int end) Returns the colors the auto charting algorithm chose or your custom colors,
from the beginning index (inclusive) and to the ending index (exclusive). | final static float | getDatasetTotal(float[] dataset) Returns the total amount of data in this set.
Parameters: data - set. | final static String | getFloatToString(float value, int places) Returns a simple string representation of the float.
If places >=0, then floats will have respresentation as integers.
If places < 0, then floats will have floating point representation with
the number of places to the right of the decimal equal to |places|.
Parameters: value - The value to represent. Parameters: places - Roughly, the number of decimal places in the representation. | final int | getLabelsPrecisionNum() Indicates how many decimal places should be in the labels of the value
axis. | final LegendArea | getLegend() Returns the legend in order to allow customization of it. | final boolean | getLegendExistence() Returns this property in order for subclasses to have access to it. | final float | getLegendToHeightRatio() Returns this property in order for subclasses to have access to it. | final float | getLegendToWidthRatio() Returns this property in order for subclasses to have access to it. | final static float | getPrecisionCeil(float value, int precision) Provides a more sophisticated use of Math.ceil(double).
For precision = 0, the return value is Math.ceil (value).
For precision > 1, the return value is the value obtained by the following
three operations: shift decimal left precision number of places, apply
the resultant value in Math.ceil, shift decimal right precision number of
places.
For precision < 1, the return value is the value obtained by the following
three operations: shift decimal right precision number of places, apply
the resultant value in Math.ceil, shift decimal left precision number of
places.
Parameters: value - The value to ceil. Parameters: precision - The basically an indicator of what digit to apply ceil to. | final static float | getPrecisionFloor(float value, int precision) Provides a more sophisticated use of Math.floor(double).
For precision = 0, the return value is Math.floor (value).
For precision > 1, the return value is the value obtained by the following
three operations: shift decimal left precision number of places, apply
the resultant value in Math.floor, shift decimal right precision number of
places.
For precision < 1, the return value is the value obtained by the following
three operations: shift decimal right precision number of places, apply
the resultant value in Math.floor, shift decimal left precision number of
places.
Parameters: value - The value to floor. Parameters: precision - The basically an indicator of what digit to apply floor to. | final static float | getPrecisionRound(float value, int precision) Provides a more sophisticated use of Math.round(double).
For precision = 0, the return value is Math.round (value).
For precision > 1, the return value is the value obtained by the following
three operations: shift decimal left precision number of places, apply
the resultant value in Math.round, shift decimal right precision number of
places.
For precision < 1, the return value is the value obtained by the following
three operations: shift decimal right precision number of places, apply
the resultant value in Math.round, shift decimal left precision number of
places.
Parameters: value - The value to round. Parameters: precision - The basically an indicator of what digit to apply round to. | final boolean | getTitleSqueeze() Indicates whether the title should be squeezed on top of, and near to the
chart. | void | paintComponent(Graphics2D g2D) Updates this parent's variables, and this' variables. | final void | resetChartAreaModel(boolean reset) Resets the model for this class. | final void | setAutoSetLayoutRatios(boolean auto) Indiates whether upon the next painting, the layout ratios distributing
the max size of the space between the components, should be set to their
ideal values based on particulars of the chart. | final void | setBetweenChartAndLegendGapExistence(boolean existence) Specifies whether the gap between the chart and the legend exists. | final void | setBetweenChartAndLegendGapThicknessModel(int thickness) Specifies the thickness of the gap between the chart and the legend for the
chart's model size. | final void | setDatasetColors(Color[] colors) Passes in a chart colors object to specify the colors for this chart. | final void | setLabelsPrecisionNum(int num) Changes the number of decimal places to be displayed on the data values
axis. | final void | setLegendExistence(boolean existence) Enables or disables the legend from calculations and painting. | final void | setLegendToHeightRatio(float ratio) Specifies how much of the maximum height less borders, gaps, and title to
make availalble to the legend maximum size. | final void | setLegendToWidthRatio(float ratio) Specifies how much of the maximum width less borders and gaps to make
availalble to the legend maximum size. | final void | setTitleSqueeze(boolean squeeze) Changes whether the chart title should be squeezed near to and on top of
the chart graph and legend. | final void | updateChartArea(Graphics2D g2D) Updates this parent's variables, and this' variables. |
DEFAULT_FLOAT | final static int DEFAULT_FLOAT(Code) | | Used by setLabelsPrecisionNum (int num).
The number is -2.
This makes the float labels have two significant labels.
|
MAX_FLOAT | final static int MAX_FLOAT(Code) | | Used by setLabelsPrecisionNum (int num).
The number is -8.
This makes the float labels have as many significant
digits as possible -- 8.
|
MAX_INTEGER | final static int MAX_INTEGER(Code) | | Used by setLabelsPrecisionNum (int num).
The number is 8.
This makes the label with the largest absolute value, have
as many zeroes as possible -- up to 8.
|
ChartArea | ChartArea()(Code) | | Creates a Chart Area with the default values.
|
getAutoSetLayoutRatios | final boolean getAutoSetLayoutRatios()(Code) | | Returns whether upon the next painting, the layout ratios distributing
the max size of the space between the components, should be set to their
ideal values based on particulars of the chart.
boolean If true, then the ratios should be adjusted. |
getBetweenChartAndLegendGapExistence | final boolean getBetweenChartAndLegendGapExistence()(Code) | | Returns whether the gap between the chart and the legend exists. If the
legend doesn't exist, this gap will automatically not exist.
boolean If true, the gap exists. |
getBetweenChartAndLegendGapThicknessModel | final int getBetweenChartAndLegendGapThicknessModel()(Code) | | Returns the thickness of the gap between the chart and the legend for the
chart's model size.
int The model thickness of the gap. |
getChartAreaNeedsUpdate | final boolean getChartAreaNeedsUpdate()(Code) | | Indicates whether some property of this class has changed.
True if some property has changed. |
getDataCategoryTotals | final static float[] getDataCategoryTotals(float[][] datasets)(Code) | | Returns the total amount of data in for each data category. Found by
summing the data in each category, from each data set.
float[] An array of the totals of each data category. |
getDatasetColors | final Color[] getDatasetColors()(Code) | | Returns the colors the auto charting algorithm chose or your custom colors.
The colors for the chart. |
getDatasetColors | final Color[] getDatasetColors(int begin, int end)(Code) | | Returns the colors the auto charting algorithm chose or your custom colors,
from the beginning index (inclusive) and to the ending index (exclusive).
The colors for the chart. |
getDatasetTotal | final static float getDatasetTotal(float[] dataset)(Code) | | Returns the total amount of data in this set.
Parameters: data - set. The data set to sum. float The sum. |
getFloatToString | final static String getFloatToString(float value, int places)(Code) | | Returns a simple string representation of the float.
If places >=0, then floats will have respresentation as integers.
If places < 0, then floats will have floating point representation with
the number of places to the right of the decimal equal to |places|.
Parameters: value - The value to represent. Parameters: places - Roughly, the number of decimal places in the representation. The representation of the value. |
getLabelsPrecisionNum | final int getLabelsPrecisionNum()(Code) | | Indicates how many decimal places should be in the labels of the value
axis. For integer values, choose 0. For floats, a good choice is
generally 2.
The number of decimal places in the labels. |
getLegend | final LegendArea getLegend()(Code) | | Returns the legend in order to allow customization of it.
The legend of this chart. |
getLegendExistence | final boolean getLegendExistence()(Code) | | Returns this property in order for subclasses to have access to it.
The specified property. |
getLegendToHeightRatio | final float getLegendToHeightRatio()(Code) | | Returns this property in order for subclasses to have access to it.
The specified property. |
getLegendToWidthRatio | final float getLegendToWidthRatio()(Code) | | Returns this property in order for subclasses to have access to it.
The specified property. |
getPrecisionCeil | final static float getPrecisionCeil(float value, int precision)(Code) | | Provides a more sophisticated use of Math.ceil(double).
For precision = 0, the return value is Math.ceil (value).
For precision > 1, the return value is the value obtained by the following
three operations: shift decimal left precision number of places, apply
the resultant value in Math.ceil, shift decimal right precision number of
places.
For precision < 1, the return value is the value obtained by the following
three operations: shift decimal right precision number of places, apply
the resultant value in Math.ceil, shift decimal left precision number of
places.
Parameters: value - The value to ceil. Parameters: precision - The basically an indicator of what digit to apply ceil to. float The resultant value. |
getPrecisionFloor | final static float getPrecisionFloor(float value, int precision)(Code) | | Provides a more sophisticated use of Math.floor(double).
For precision = 0, the return value is Math.floor (value).
For precision > 1, the return value is the value obtained by the following
three operations: shift decimal left precision number of places, apply
the resultant value in Math.floor, shift decimal right precision number of
places.
For precision < 1, the return value is the value obtained by the following
three operations: shift decimal right precision number of places, apply
the resultant value in Math.floor, shift decimal left precision number of
places.
Parameters: value - The value to floor. Parameters: precision - The basically an indicator of what digit to apply floor to. float The resultant value. |
getPrecisionRound | final static float getPrecisionRound(float value, int precision)(Code) | | Provides a more sophisticated use of Math.round(double).
For precision = 0, the return value is Math.round (value).
For precision > 1, the return value is the value obtained by the following
three operations: shift decimal left precision number of places, apply
the resultant value in Math.round, shift decimal right precision number of
places.
For precision < 1, the return value is the value obtained by the following
three operations: shift decimal right precision number of places, apply
the resultant value in Math.round, shift decimal left precision number of
places.
Parameters: value - The value to round. Parameters: precision - The basically an indicator of what digit to apply round to. float The resultant value. |
getTitleSqueeze | final boolean getTitleSqueeze()(Code) | | Indicates whether the title should be squeezed on top of, and near to the
chart. The title gap spacing will be respected.
True if the title will be squeezed. |
paintComponent | void paintComponent(Graphics2D g2D)(Code) | | Updates this parent's variables, and this' variables.
Parameters: g2D - The graphics context to use for calculations. |
resetChartAreaModel | final void resetChartAreaModel(boolean reset)(Code) | | Resets the model for this class. The model is used for shrinking and
growing of its components based on the maximum size of this class. If this
method is called, then the next time the maximum size is set, this classes
model maximum size will be made equal to the new maximum size. Effectively
what this does is ensure that whenever this objects maximum size is equal
to the one given, then all of the components will take on their default
model sizes. Note: This is only useful when auto model max sizing is
disabled.
Parameters: reset - True causes the max model size to be set upon the next maxsizing. |
setAutoSetLayoutRatios | final void setAutoSetLayoutRatios(boolean auto)(Code) | | Indiates whether upon the next painting, the layout ratios distributing
the max size of the space between the components, should be set to their
ideal values based on particulars of the chart.
Parameters: auto - If true, then the ratios will be adjusted. |
setBetweenChartAndLegendGapExistence | final void setBetweenChartAndLegendGapExistence(boolean existence)(Code) | | Specifies whether the gap between the chart and the legend exists. If the
legend doesn't exist, this gap will automatically not exist.
Parameters: existence - If true, the gap exists. |
setBetweenChartAndLegendGapThicknessModel | final void setBetweenChartAndLegendGapThicknessModel(int thickness)(Code) | | Specifies the thickness of the gap between the chart and the legend for the
chart's model size.
Parameters: thickness - The model thickness of the gap. |
setDatasetColors | final void setDatasetColors(Color[] colors)(Code) | | Passes in a chart colors object to specify the colors for this chart.
Parameters: colors - The chart colors object. |
setLabelsPrecisionNum | final void setLabelsPrecisionNum(int num)(Code) | | Changes the number of decimal places to be displayed on the data values
axis. A positive int specifies how many places to the right of the decimal
place should be kept (Float Labels). A non positive int specifies how many
zeros to the left of the decimal should occur (Integer Labels).
Use MAX_ZEROES if you want integer labels with only one non-zero number.
Parameters: num - The number of decimal places. |
setLegendExistence | final void setLegendExistence(boolean existence)(Code) | | Enables or disables the legend from calculations and painting.
Parameters: existence - The existence of the legend. |
setLegendToHeightRatio | final void setLegendToHeightRatio(float ratio)(Code) | | Specifies how much of the maximum height less borders, gaps, and title to
make availalble to the legend maximum size.
Parameters: ratio - The ratio to the height, to make available to the legend. |
setLegendToWidthRatio | final void setLegendToWidthRatio(float ratio)(Code) | | Specifies how much of the maximum width less borders and gaps to make
availalble to the legend maximum size.
Parameters: ratio - The ratio to the width, to make available to the legend. |
setTitleSqueeze | final void setTitleSqueeze(boolean squeeze)(Code) | | Changes whether the chart title should be squeezed near to and on top of
the chart graph and legend. The between title and chart gap will be
respected.
Parameters: squeeze - True if the title should be squeezed. |
updateChartArea | final void updateChartArea(Graphics2D g2D)(Code) | | Updates this parent's variables, and this' variables.
Parameters: g2D - The graphics context to use for calculations. |
Methods inherited from net.sourceforge.chart2d.Area | final int applyRatio(int model, float ratio)(Code)(Java Doc) final boolean getAreaNeedsUpdate()(Code)(Java Doc) final boolean getAutoSize(int which)(Code)(Java Doc) final Color getBackgroundColor()(Code)(Java Doc) final boolean getBackgroundExistence()(Code)(Java Doc) final Color getBorderColor()(Code)(Java Doc) final Color getBorderColor(int which)(Code)(Java Doc) final boolean getBorderExistence()(Code)(Java Doc) final boolean getBorderExistence(int which)(Code)(Java Doc) final int getBorderThickness(int which)(Code)(Java Doc) final int getBorderThickness()(Code)(Java Doc) final int getBorderThicknessModel()(Code)(Java Doc) final int getBorderThicknessModel(int which)(Code)(Java Doc) final boolean getGapExistence()(Code)(Java Doc) final boolean getGapExistence(int which)(Code)(Java Doc) final int getGapThickness()(Code)(Java Doc) final int getGapThickness(int which)(Code)(Java Doc) final int getGapThicknessModel()(Code)(Java Doc) final int getJustifications(int which)(Code)(Java Doc) int getLightSource()(Code)(Java Doc) final int getOffsetThickness()(Code)(Java Doc) final float getRatio(int which)(Code)(Java Doc) final boolean getResetAreaModel()(Code)(Java Doc) final Dimension getSize(int which)(Code)(Java Doc) final Point getSizeLocation(int which)(Code)(Java Doc) final Dimension getSpaceSize(int which)(Code)(Java Doc) final Point getSpaceSizeLocation(int which)(Code)(Java Doc) void paintComponent(Graphics2D g2D)(Code)(Java Doc) final void resetAreaModel(boolean reset)(Code)(Java Doc) final void setAutoJustifys(boolean horizontal, boolean vertical)(Code)(Java Doc) final void setAutoSizes(boolean maxModel, boolean min)(Code)(Java Doc) final void setBackgroundColor(Color color)(Code)(Java Doc) final void setBackgroundExistence(boolean existence)(Code)(Java Doc) final void setBorderAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)(Code)(Java Doc) final void setBorderColor(Color color)(Code)(Java Doc) final void setBorderColors(Color left, Color right, Color top, Color bottom)(Code)(Java Doc) final void setBorderCornerAssociations(int leftTop, int leftBottom, int rightTop, int rightBottom)(Code)(Java Doc) final void setBorderExistence(boolean existences)(Code)(Java Doc) final void setBorderExistences(boolean left, boolean right, boolean top, boolean bottom)(Code)(Java Doc) final void setBorderThicknessModel(int thickness)(Code)(Java Doc) final void setBorderThicknessModels(int left, int right, int top, int bottom)(Code)(Java Doc) final void setCustomRatio(int which, boolean customize, float ratio)(Code)(Java Doc) final void setGapAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)(Code)(Java Doc) final void setGapExistence(boolean existence)(Code)(Java Doc) final void setGapExistences(boolean left, boolean right, boolean top, boolean bottom)(Code)(Java Doc) final void setGapThicknessModel(int thickness)(Code)(Java Doc) final void setGapThicknessModels(int left, int right, int top, int bottom)(Code)(Java Doc) final void setJustifications(int horizontal, int vertical)(Code)(Java Doc) void setLightSource(int source)(Code)(Java Doc) final void setLockRatios(boolean lock)(Code)(Java Doc) final void setSize(int which, Dimension size)(Code)(Java Doc) final void setSizeLocation(int which, Point location)(Code)(Java Doc) final void setSpaceSize(int which, Dimension size)(Code)(Java Doc) final void setSpaceSizeLocation(int which, Point location)(Code)(Java Doc) final void updateArea()(Code)(Java Doc)
|
|
|