|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.sourceforge.chart2d.Area
|
+--net.sourceforge.chart2d.PieArea
A container for many variables and components relating to a pie area.
A pie area is the area that contains only the pie of a pie chart. It doesn't
have a legend.
Features:
Allows for charting both floats and int values. Works fine even if all
values are zero. Does not accept negative values. Outputs center points
of sectors so that labels can be drawn into the sectors, touching these
points. Outpouts how many sectors are in each quarter of the pie, so that
appropriate placement of labels can be decided. The first datum in the
data set will be the first sector beginning from the angle of 135 degrees and
ending somewhere clockwise to it It will have the first color in the
colors set. The remaining sectors are laid out similarly, clockwise.
| Fields inherited from class net.sourceforge.chart2d.Area |
BETWEEN, BOTTOM, CENTER, CENTERED, CONTINUOUS, DASHED, DOTTED, FLOAT, HEIGHT, HORIZONTAL, INTEGER, LABELSBOTTOM, LABELSLEFT, LEFT, LEFTBOTTOM, LEFTRIGHT, LEFTTOP, LESSER, MAX, MAXMODEL, MIN, RIGHT, RIGHTBOTTOM, RIGHTTOP, TOP, TOPBOTTOM, VERTICAL, WIDTH |
| Constructor Summary | |
(package private) |
PieArea()
Creates a pie area with the default values. |
| Method Summary | |
(package private) java.awt.Color[] |
getColors()
Returns this property. |
(package private) float[] |
getDataSet()
Returns the raw numbers to represent by the pie. |
(package private) int |
getNumSectors()
Returns this property. |
(package private) int[] |
getNumSectorsInQuarters()
Returns this property. |
(package private) boolean |
getOutlineSectors()
Returns whether the sectors should have a thin outline. |
(package private) java.awt.Color |
getOutlineSectorsColor()
Returns the color of the sectors outline if it exists. |
(package private) boolean |
getPieAreaNeedsUpdate()
Indicates whether some property of this class has changed. |
(package private) java.awt.Point[] |
getPointsInSectors()
Returns a point in each sector at the depth specified by setSectorsPointDepthRatio(float). |
(package private) java.awt.Point[] |
getPointsOutSectors()
Returns a point in out of each sector at the location indicated by setSectorsPointExternalRatio(float). |
(package private) float |
getSectorPointDepthRatio()
Returns how far into the sector the depth of the points from the getPointsInSectors() method are. |
(package private) void |
paintComponent(java.awt.Graphics2D g2D)
Paints all the components of this class. |
(package private) void |
resetPieAreaModel(boolean reset)
Resets the model for this class. |
(package private) void |
setColors(java.awt.Color[] colors)
For input of the color of each sector that represents a datum of the data set. |
(package private) void |
setCustomSpaceSize(boolean customize,
java.awt.Dimension size)
Sets the "minimum" size of the pie directly. |
(package private) void |
setDataSet(float[] values)
For input of the raw numbers to represent by the pie. |
(package private) void |
setOutlineSectors(boolean outline)
Indicates whether the sectors should have a thin outline. |
(package private) void |
setOutlineSectorsColor(java.awt.Color color)
Indicates the color of the sectors outline if it exists. |
(package private) void |
setPiePrefSpaceSize(int size)
Sets the model size of the pie. |
(package private) void |
setSectorGapPointRatio(float ratio)
Determines how far out of the sector the points from the getPointsOutSectors() method are. |
(package private) void |
setSectorPointDepthRatio(float ratio)
Determines how far into the sector the depth of the points from the getPointsInSectors() method are. |
(package private) void |
updatePieArea()
Updates this parent's variables, and this' variables. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
PieArea()
| Method Detail |
void setOutlineSectors(boolean outline)
outline - If true, then the outline exists.void setOutlineSectorsColor(java.awt.Color color)
color - The color for the outline.boolean getOutlineSectors()
java.awt.Color getOutlineSectorsColor()
void setSectorPointDepthRatio(float ratio)
ratio - The ratio on the radius of the circle.void setSectorGapPointRatio(float ratio)
ratio - The ratio on the radius of the circle.void setDataSet(float[] values)
values - The raw numbers to represent by the pie.void setColors(java.awt.Color[] colors)
colors - The colors of the sectors.void setPiePrefSpaceSize(int size)
size - The model size of the pie.
void setCustomSpaceSize(boolean customize,
java.awt.Dimension size)
size - The number to multiply to get the minimum size.float[] getDataSet()
java.awt.Color[] getColors()
int getNumSectors()
int[] getNumSectorsInQuarters()
float getSectorPointDepthRatio()
java.awt.Point[] getPointsInSectors()
java.awt.Point[] getPointsOutSectors()
void resetPieAreaModel(boolean reset)
reset - True causes the max model size to be set upon the next max
sizing.boolean getPieAreaNeedsUpdate()
void updatePieArea()
void paintComponent(java.awt.Graphics2D g2D)
paintComponent in class Areag2D - The graphics context for calculations and painting.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||