org.ujac.chart
Class DonutChart3D

java.lang.Object
  extended by org.ujac.chart.BaseChart
      extended by org.ujac.chart.BasePieChart
          extended by org.ujac.chart.BasePieChart3D
              extended by org.ujac.chart.DonutChart3D
All Implemented Interfaces:
Chart

public class DonutChart3D
extends BasePieChart3D

Name: DonutChart3D
Description: A class rendering 3D donut charts.

Author:
lauerc

Field Summary
static float DEFAULT_HOLE_SIZE
          The default hole size.
 
Fields inherited from class org.ujac.chart.BasePieChart3D
DEFAULT_PIE_HEIGHT
 
Fields inherited from class org.ujac.chart.BasePieChart
angleDiffs, DEFAULT_DESCRIPTION_PATTERN, DEFAULT_PIE_DESCRIPTION_ANCHOR_RATIO, DEFAULT_PIE_DESCRIPTION_BASELINE_RATIO, DEFAULT_PIE_DESCRIPTION_LAYOUT, descriptionLines, endAngles, endArcs, halfPieHeight, halfPieWidth, moveDescriptionLine, moveToCenter, percentages, PIE_DESCRIPTION_LAYOUT_BORDER, PIE_DESCRIPTION_LAYOUT_ROUND, startAngles, startArcs
 
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_SHADOW_COLOR, DEFAULT_SHADOW_OFFSET, DEFAULT_TITLE_FONT, defaultPercentFormat, defaultValueFormat, model
 
Fields inherited from interface org.ujac.chart.Chart
ATTR_AREA_LABELS, ATTR_BACKGROUND_COLOR, ATTR_BORDER_WIDTH, ATTR_DESCRIPTION_COLOR, ATTR_DESCRIPTION_FONT, ATTR_DESCRIPTION_LINE_WIDTH, ATTR_DESCRIPTION_PATTERN, ATTR_FILL_AREA, ATTR_GRID_BACKGROUND_COLOR, ATTR_GRID_COLOR, ATTR_LINE_WIDTH, ATTR_PADDING, ATTR_PADDING_BOTTOM, ATTR_PADDING_LEFT, ATTR_PADDING_RIGHT, ATTR_PADDING_TOP, ATTR_PERCENT_FORMAT, ATTR_PIE_DESCRIPTION_ANCHOR_RATIO, ATTR_PIE_DESCRIPTION_BASELINE_RATIO, ATTR_PIE_DESCRIPTION_LAYOUT, ATTR_PIE_HEIGHT, ATTR_SCALE_ARROWHEAD_LENGTH, ATTR_SCALE_ARROWHEAD_STYLE, ATTR_SCALE_ARROWHEAD_WIDTH, ATTR_SCALE_MARK_LENGTH, ATTR_SCALE_VALUE_FORMAT, ATTR_SEGMENT_COLORS, ATTR_SEGMENT_LABELS, ATTR_SEGMENT_MARK_STYLE, ATTR_SEGMENT_SCALE_DESCRIPTION, ATTR_SHADOW_COLOR, ATTR_SHADOW_OFFSET, ATTR_TITLE_FONT, ATTR_VALUE_FORMAT, ATTR_VALUE_SCALE_DESCRIPTION, ATTR_VALUE_STEP_SIZE, ATTR_VIEW_GRID, ATTR_VIEW_LEGEND, ATTR_VIEW_SCALE_ARROWS
 
Constructor Summary
DonutChart3D()
           
 
Method Summary
protected  void drawSlice(Graphics2D graphics, Color color, int sliceIdx, int stepIdx)
          Draws a pie slice.
protected  void drawSliceShadow(Graphics2D graphics, Color color, int sliceIdx)
          Draws the shadow of a pie slice.
protected  int getDescriptionDrawingStep()
          Gets the index of the step before which to draw the chart description.
 float getHoleSize()
          Gets the hole size.
protected  int getNumDrawingSteps()
          Gets the number of drawing steps to perform to draw the slices.
protected  void init(int numSegments)
          Initializes the data structures for the chart metrics.
 
Methods inherited from class org.ujac.chart.BasePieChart3D
getDeltaY, getPieHeight, getSliceHeight
 
Methods inherited from class org.ujac.chart.BasePieChart
calculateSliceMetrics, draw, drawDescription, getPieCenter, getPieDescriptionAnchorRatio, getPieDescriptionBaselineRatio, getPieDescriptionLayout, getPieSize, supportsNegativeValues
 
Methods inherited from class org.ujac.chart.BaseChart
addAttributeDefinition, fillSupportedAttributes, getAreaLabels, getAttributes, getBackgroundColor, getBorderWidth, getBottomPadding, getDescriptionColor, getDescriptionFont, getDescriptionLineWidth, getDescriptionPattern, getLeftPadding, getMaxValue, getMinValue, getModel, getPercentFormat, getRightPadding, getSegmentLabels, getShadowColor, getShadowLength, getSupportedAttributes, getTitleFont, getTopPadding, getValueFormat, setAttributes, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HOLE_SIZE

public static final float DEFAULT_HOLE_SIZE
The default hole size.

See Also:
Constant Field Values
Constructor Detail

DonutChart3D

public DonutChart3D()
Method Detail

getHoleSize

public float getHoleSize()
Gets the hole size.

Returns:
The current hole size.

getNumDrawingSteps

protected int getNumDrawingSteps()
Gets the number of drawing steps to perform to draw the slices.

Specified by:
getNumDrawingSteps in class BasePieChart
Returns:
The number of drawing steps.

getDescriptionDrawingStep

protected int getDescriptionDrawingStep()
Gets the index of the step before which to draw the chart description.

Overrides:
getDescriptionDrawingStep in class BasePieChart
Returns:
The index of the step before which to draw the description.

init

protected void init(int numSegments)
Initializes the data structures for the chart metrics.

Overrides:
init in class BasePieChart3D
Parameters:
numSegments - The number of metrics for which to
See Also:
BasePieChart.init(int)

drawSlice

protected void drawSlice(Graphics2D graphics,
                         Color color,
                         int sliceIdx,
                         int stepIdx)
Draws a pie slice.

Specified by:
drawSlice in class BasePieChart
Parameters:
graphics - The graphics object to draw width.
color - The slice's color.
sliceIdx - The index of the slice to draw.
stepIdx - The index of the drawing step to perform.

drawSliceShadow

protected void drawSliceShadow(Graphics2D graphics,
                               Color color,
                               int sliceIdx)
Draws the shadow of a pie slice.

Specified by:
drawSliceShadow in class BasePieChart
Parameters:
graphics - The graphics object to draw width.
color - The slice's color.
sliceIdx - The index of the slice to draw.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.