org.ujac.chart
Class PieChartDescriptionItem

java.lang.Object
  extended by org.ujac.chart.BaseChartItem
      extended by org.ujac.chart.TextChartItem
          extended by org.ujac.chart.PieChartDescriptionItem
All Implemented Interfaces:
Comparable, ChartItem

public class PieChartDescriptionItem
extends TextChartItem
implements Comparable

Name: PieChartDescriptionItem
Description: Holds all informations of an pie chart description item.

Author:
lauerc

Field Summary
 
Fields inherited from class org.ujac.chart.TextChartItem
DEFAULT_TEXT_COLOR
 
Fields inherited from class org.ujac.chart.BaseChartItem
outputArea, position
 
Constructor Summary
PieChartDescriptionItem(int itemIdx, ChartItemPosition position, int maxWidth, int hAlign, String text, Font font)
          Constructs a PieChartDescriptionItem instance with specific attributes.
PieChartDescriptionItem(int itemIdx, ChartItemPosition position, String text, Font font)
          Constructs a PieChartDescriptionItem instance with specific attributes.
 
Method Summary
 int compareTo(Object o)
          Compares the vertical positions of this item and the given item.
 int getItemIdx()
          Gets the item's index.
 
Methods inherited from class org.ujac.chart.TextChartItem
calculateOutputArea, draw, getColor, getFont, getHAlign, getMaxWidth, getRotate, getText, setRotate
 
Methods inherited from class org.ujac.chart.BaseChartItem
alignItem, getHeight, getOutputArea, getPosition, getWidth, move, moveTo, resetMetrics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PieChartDescriptionItem

public PieChartDescriptionItem(int itemIdx,
                               ChartItemPosition position,
                               String text,
                               Font font)
Constructs a PieChartDescriptionItem instance with specific attributes.

Parameters:
itemIdx - The index of the related pie slice.
position - The position of the chart item.
text - The text of the chart item.
font - The font to render with.

PieChartDescriptionItem

public PieChartDescriptionItem(int itemIdx,
                               ChartItemPosition position,
                               int maxWidth,
                               int hAlign,
                               String text,
                               Font font)
Constructs a PieChartDescriptionItem instance with specific attributes.

Parameters:
itemIdx - The index of the related pie slice.
position - The position of the chart item.
maxWidth - The maximm width of the text item.
hAlign - The horizontal alignment of the text.
text - The text of the chart item.
font - The font to render with.
Method Detail

getItemIdx

public int getItemIdx()
Gets the item's index.

Returns:
The item's index.

compareTo

public int compareTo(Object o)
Compares the vertical positions of this item and the given item.

Specified by:
compareTo in interface Comparable
See Also:
Comparable.compareTo(java.lang.Object)


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