|
|||||||||
| Home >> All >> org >> ujac >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.ujac.chart
Class BasePieChart

java.lang.Objectorg.ujac.chart.BaseChart
org.ujac.chart.BasePieChart
- All Implemented Interfaces:
- Chart
- Direct Known Subclasses:
- BasePieChart3D, PieChart2D
- public abstract class BasePieChart
- extends BaseChart
Name: BasePieChart
Description: A base class for the rendering of pie charts.
Log: $Log: BasePieChart.java,v $
Log: Revision 1.27 2003/11/23 17:08:04 lauerc
Log: Cleaned up code.
Log:
Log: Revision 1.26 2003/11/14 12:45:48 lauerc
Log: Added shadowing support.
Log:
Log: Revision 1.25 2003/11/14 01:30:28 lauerc
Log: Added support for methods getMinValue + getMaxValue.
Log:
Log: Revision 1.24 2003/11/01 12:04:47 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.23 2003/10/31 06:28:31 lauerc
Log: Added support for attribute 'description-color'.
Log:
Log: Revision 1.22 2003/10/08 22:58:18 lauerc
Log: Reorganized chart attributes.
Log:
Log: Revision 1.21 2003/10/07 06:55:57 lauerc
Log: Added support for new attributes.
Log:
Log: Revision 1.20 2003/09/27 11:59:34 lauerc
Log: Fixed percent value calculation.
Log:
Log: Revision 1.19 2003/09/25 23:28:06 lauerc
Log: Removed attributes value-unit and display-values in favour of the more flexible attribute description-pattern.
Log:
Log: Revision 1.18 2003/09/23 07:04:35 lauerc
Log: Fixed vertical item positioning.
Log:
Log: Revision 1.17 2003/09/23 00:12:21 lauerc
Log: Fixed horizontal desccription space measurement at method drawDescription.
Log:
Log: Revision 1.16 2003/09/22 05:26:06 lauerc
Log: Considering each desription item's specific metrics now at method drawDescription.
Log:
Log: Revision 1.15 2003/09/21 12:45:21 lauerc
Log: Setting width limitations to chart description items at method drawDescription.
Log:
Log: Revision 1.14 2003/09/21 12:29:30 lauerc
Log: Drawing rounded lines to make hires charts look nicer.
Log:
Log: Revision 1.13 2003/09/21 12:12:41 lauerc
Log: Added possibility to display chart at slice descriptions.
Log:
Log: Revision 1.12 2003/09/21 10:51:03 lauerc
Log: Added support for padding attributes.
Log:
Log: Revision 1.11 2003/09/20 23:11:17 lauerc
Log: Fixed bugs in managing vertical description item positions.
Log:
Log: Revision 1.10 2003/09/20 19:49:48 lauerc
Log: Enhances description item positioning.
Log:
Log: Revision 1.9 2003/09/20 01:31:29 lauerc
Log: Fixed delta handling regarding 2D pie geometry.
Log:
Log: Revision 1.8 2003/09/20 01:13:43 lauerc
Log: Initially implemented description drawing.
Log:
Log: Revision 1.7 2003/09/19 06:56:57 lauerc
Log: Changed stroke for drowing of slices to very thin line to make high resolution output (PDF) not look ugly.
Log:
Log: Revision 1.6 2003/09/19 06:37:02 lauerc
Log: Initial revision.
Log:
Log: Revision 1.5 2003/09/19 00:10:41 lauerc
Log: Started implementation of chart description.
Log:
Log: Revision 1.4 2003/09/18 00:22:41 lauerc
Log: Changed default pie height to 10 (percent).
Log:
Log: Revision 1.3 2003/09/17 19:13:55 lauerc
Log: Changed architecture for better reusage of basic pie operations.
Log:
Log: Revision 1.2 2003/09/17 00:33:19 lauerc
Log: Added attribute 'pie-height'.
Log: Added support for method drawSliceSurface, which is performed for all slices,
Log: after the 'regular' drawing has been done.
Log:
Log: Revision 1.1 2003/09/16 22:20:20 lauerc
Log: Initial revision.
Log:
- Version:
- $Revision: 1.27 $
| Field Summary | |
protected double[] |
angleDiffs
The array holding the arc differences. |
static java.lang.String |
DEFAULT_DESCRIPTION_PATTERN
The default description pattern. |
protected java.awt.geom.Line2D.Double[] |
descriptionLines
The description line definitions. |
protected double[] |
endAngles
The array holding the end angles. |
protected double[] |
endArcs
The array holding the end angles. |
protected double |
halfPieHeight
The half pie height. |
protected double |
halfPieWidth
The half pie width. |
protected java.awt.geom.AffineTransform |
moveDescriptionLine
Moves the given description line to its correct position. |
protected java.awt.geom.AffineTransform |
moveToCenter
Moves the given object to the center of the pie. |
protected double[] |
percentages
The array holding the percentages for the slices. |
private java.awt.Point |
pieCenter
The pie center. |
private java.awt.Dimension |
pieSize
The pie's size. |
protected double[] |
startAngles
The array holding the start angles. |
protected double[] |
startArcs
The array holding the start angles. |
| Fields inherited from class org.ujac.chart.BaseChart |
attributes, DEFAULT_BORDER_WIDTH, DEFAULT_DESCRIPTION_COLOR, DEFAULT_DESCRIPTION_FONT, DEFAULT_DESCRIPTION_LINE_WIDTH, DEFAULT_PADDING, DEFAULT_PERCENT_FORMAT, DEFAULT_SHADOW_COLOR, DEFAULT_SHADOW_OFFSET, DEFAULT_TITLE_FONT, DEFAULT_VALUE_FORMAT, model |
| Constructor Summary | |
BasePieChart()
|
|
| Method Summary | |
protected void |
calculateSliceMetrics(int sliceIdx,
double startAngle,
double endAngle)
Calculates the metrics for the given slice |
java.awt.geom.Rectangle2D |
draw(java.awt.geom.Rectangle2D viewport,
java.awt.Graphics2D graphics)
Draws the chart to the given chart output. |
void |
drawDescription(java.awt.geom.Rectangle2D viewport,
java.awt.Graphics2D graphics)
Draws the chart description. |
protected abstract void |
drawSlice(java.awt.Graphics2D graphics,
java.awt.Color color,
int sliceIdx,
int stepIdx)
Draws a pie slice. |
protected abstract void |
drawSliceShadow(java.awt.Graphics2D graphics,
java.awt.Color color,
int sliceIdx)
Draws the shadow of a pie slice. |
protected double |
getDeltaY()
Gets the vertical delta factor for the pie height. |
protected int |
getDescriptionDrawingStep()
Gets the index of the step before which to draw the chart description. |
protected abstract int |
getNumDrawingSteps()
Gets the number of drawing steps to perform to draw the slices. |
protected java.awt.Point |
getPieCenter()
Gets the pie center. |
protected java.awt.Dimension |
getPieSize()
Gets the pie size. |
protected int |
getSliceHeight()
Gets the height of the slices. |
protected void |
init(int numSegments)
Initializes the data structures for the chart metrics. |
boolean |
supportsNegativeValues()
Tells, whether the chart supports negative values or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DEFAULT_DESCRIPTION_PATTERN
public static final java.lang.String DEFAULT_DESCRIPTION_PATTERN
- The default description pattern.
- See Also:
- Constant Field Values
pieCenter
private java.awt.Point pieCenter
- The pie center.
pieSize
private java.awt.Dimension pieSize
- The pie's size.
halfPieWidth
protected double halfPieWidth
- The half pie width.
halfPieHeight
protected double halfPieHeight
- The half pie height.
percentages
protected double[] percentages
- The array holding the percentages for the slices.
startAngles
protected double[] startAngles
- The array holding the start angles.
endAngles
protected double[] endAngles
- The array holding the end angles.
angleDiffs
protected double[] angleDiffs
- The array holding the arc differences.
startArcs
protected double[] startArcs
- The array holding the start angles.
endArcs
protected double[] endArcs
- The array holding the end angles.
moveToCenter
protected java.awt.geom.AffineTransform moveToCenter
- Moves the given object to the center of the pie.
moveDescriptionLine
protected java.awt.geom.AffineTransform moveDescriptionLine
- Moves the given description line to its correct position.
descriptionLines
protected java.awt.geom.Line2D.Double[] descriptionLines
- The description line definitions.
| Constructor Detail |
BasePieChart
public BasePieChart()
| Method Detail |
supportsNegativeValues
public boolean supportsNegativeValues()
- Tells, whether the chart supports negative values or not.
- Specified by:
supportsNegativeValuesin interfaceChart- Overrides:
supportsNegativeValuesin classBaseChart
getPieCenter
protected java.awt.Point getPieCenter()
- Gets the pie center.
getPieSize
protected java.awt.Dimension getPieSize()
- Gets the pie size.
getDeltaY
protected double getDeltaY()
- Gets the vertical delta factor for the pie height.
getSliceHeight
protected int getSliceHeight()
- Gets the height of the slices.
draw
public java.awt.geom.Rectangle2D draw(java.awt.geom.Rectangle2D viewport, java.awt.Graphics2D graphics) throws ChartException
- Description copied from class:
BaseChart - Draws the chart to the given chart output.
init
protected void init(int numSegments)
- Initializes the data structures for the chart metrics.
calculateSliceMetrics
protected void calculateSliceMetrics(int sliceIdx,
double startAngle,
double endAngle)
- Calculates the metrics for the given slice
getNumDrawingSteps
protected abstract int getNumDrawingSteps()
- Gets the number of drawing steps to perform to draw the slices.
getDescriptionDrawingStep
protected int getDescriptionDrawingStep()
- Gets the index of the step before which to draw the chart
description.
drawSlice
protected abstract void drawSlice(java.awt.Graphics2D graphics, java.awt.Color color, int sliceIdx, int stepIdx)
- Draws a pie slice.
drawSliceShadow
protected abstract void drawSliceShadow(java.awt.Graphics2D graphics, java.awt.Color color, int sliceIdx)
- Draws the shadow of a pie slice.
drawDescription
public void drawDescription(java.awt.geom.Rectangle2D viewport, java.awt.Graphics2D graphics) throws ChartException
- Draws the chart description.
|
|||||||||
| Home >> All >> org >> ujac >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC