|
|||||||||
| 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.FontArea
|
+--net.sourceforge.chart2d.PieLabelsArea
This class manages a set of labels that can be used to encircle a PieArea, labeling its pie sectors. The way it works is that you must set the size of the max size for the class and also the size that it is supposed to encircle. This provides three different labeling types. The text of the label can be the data number of that sector, the text of the label can be a percent of the total on the data number of that sector, and the text of the label can be both. The font properties can be set using the methods of this' parent class. This class can return a point centered near each label so that lines can be drawn from the labels to their corresponding pie sectors.
| Field Summary | |
(package private) static int |
PERCENT
Static variable for setLabelsType (int) method. |
(package private) static int |
RAW
Static variable for setLabelsType (int) method. |
| 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) |
PieLabelsArea()
The general constructor for this class. |
| Method Summary | |
(package private) java.awt.Rectangle |
getInteriorBounds(java.awt.Graphics2D g2D)
Returns a bounding rectangle of the area the labels encircle. |
(package private) boolean |
getLabelsPointsGapExistence()
Returns whether the gaps between the labels and the points near each label exist. |
(package private) int |
getLabelsPointsGapThicknessModel()
Returns how far from the labels, the points on each label should be. |
(package private) int |
getLabelsType()
Indirectly returns the text of the labels. |
(package private) boolean |
getPieLabelsAreaNeedsUpdate()
Indicates whether some property of this class has changed. |
(package private) java.awt.Point[] |
getPointsNearLabels(java.awt.Graphics2D g2D)
Returns an array of points, one for each label, that are near the labels. |
(package private) int |
getRawLabelsPrecision()
Returns how many significant digits are wanted. |
(package private) void |
paintComponent(java.awt.Graphics2D g2D)
Paints this class. |
(package private) void |
resetPieLabelsAreaModel(boolean reset)
Resets the model for this class. |
(package private) void |
setBetweenLabelsGapExistence(boolean existence)
Indicates whether a gap should exist between the labels. |
(package private) void |
setBetweenLabelsGapThicknessModel(int thickness)
Indicates the model thickness of the gap between each label. |
(package private) void |
setCustomSize(boolean customize,
java.awt.Dimension size)
Indicates the final size of the area. |
(package private) void |
setLabelsPointsGapExistence(boolean existence)
Specifies whether the gaps between the labels and the points near each label exist. |
(package private) void |
setLabelsPointsGapThicknessModel(int thickness)
Indicates how far from the labels, the points on each label should be. |
(package private) void |
setLabelsType(int type)
Indirectly sets the text of the labels. |
(package private) void |
setPieArea(PieArea pie)
Passes in the PieArea to encircle with labels. |
(package private) void |
setRawLabelsPrecision(int precision)
Indicates how many significant digits are wanted. |
(package private) void |
updatePieLabelsArea(java.awt.Graphics2D g2D)
Updates all this classes variables. |
| Methods inherited from class net.sourceforge.chart2d.FontArea |
getFont, getFontAreaNeedsUpdate, getFontColor, getFontName, getFontPointModel, getFontStyle, resetFontAreaModel, setFontColor, setFontName, setFontPointModel, setFontStyle, updateFontArea |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
static final int RAW
static final int PERCENT
| Constructor Detail |
PieLabelsArea()
| Method Detail |
void setCustomSize(boolean customize,
java.awt.Dimension size)
customize - If true, then the custom size will be used.size - The custom size if used.void setPieArea(PieArea pie)
pie - The PieArea.void setLabelsPointsGapExistence(boolean existence)
existence - If true, the gaps exist.void setLabelsPointsGapThicknessModel(int thickness)
thickness - The model thickness of the gap between the label and the
point.void setRawLabelsPrecision(int precision)
The - desired precision of the raw labels.void setBetweenLabelsGapExistence(boolean existence)
existence - If true, the gaps will exist.void setBetweenLabelsGapThicknessModel(int thickness)
thickness - The model minimum thickness of the gap.void setLabelsType(int type)
type - What text occurrs in each label.int getLabelsPointsGapThicknessModel()
int getRawLabelsPrecision()
int getLabelsType()
java.awt.Rectangle getInteriorBounds(java.awt.Graphics2D g2D)
boolean getLabelsPointsGapExistence()
java.awt.Point[] getPointsNearLabels(java.awt.Graphics2D g2D)
boolean getPieLabelsAreaNeedsUpdate()
void resetPieLabelsAreaModel(boolean reset)
reset - True causes the max model size to be set upon the next max
sizing.void updatePieLabelsArea(java.awt.Graphics2D g2D)
void paintComponent(java.awt.Graphics2D g2D)
paintComponent in class FontAreag2D - The graphics context for calculations and painting.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||