JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart
Class JCPieChartFormat

java.lang.Object
  |
  +--com.klg.jclass.chart.JCPieChartFormat
All Implemented Interfaces:
JCChartTypeFormat, Serializable

public class JCPieChartFormat
extends Object
implements JCChartTypeFormat, Serializable

An object that manages chart properties specific to pie charts.

See Also:
Serialized Form

Field Summary
static int ALL
           
static int ASCENDING_ORDER
           
static int DATA_ORDER
           
static int DESCENDING_ORDER
           
protected  Point[] explodeList
           
protected  int explodeOffset
           
protected  int minSlices
           
static int OTHER_SLICE
          Used to specify the other or all slices of a pie chart.
protected  com.klg.jclass.util.ImageMapInfo[] otherImageMapInfo
           
protected  String otherLabel
           
protected  com.klg.jclass.util.ImageMapInfo otherLegendImageMapInfo
           
protected  com.klg.jclass.chart.JCChartStyle otherStyle
           
protected  com.klg.jclass.chart.Changeable parent
           
static int PIE_PERCENTILE
           
static int SLICE_CUTOFF
           
protected  int sortOrder
           
protected  double startAngle
           
protected  int thresholdMethod
           
protected  double thresholdValue
           
 
Constructor Summary
JCPieChartFormat()
           
JCPieChartFormat(com.klg.jclass.chart.Changeable p)
           
 
Method Summary
 Point[] getExplodeList()
          Gets the ExplodeList property, which specifies a list of exploded pie slices in the pie charts.
 int getExplodeOffset()
          Gets the ExplodeOffset property, which specifies the distance a slice is exploded from the center of a pie chart.
 int getMinSlices()
          Gets the MinSlices property, which represents the minimum number of pie slices that the chart must display, overriding the placing of series into the "other" slice.
 com.klg.jclass.util.ImageMapInfo[] getOtherImageMapInfo()
          Retrieves an array of image map information for the other slice, one for each point (i.e.
 String getOtherLabel()
          Gets the OtherLabel property, which represents the label used on the "other" pie slice.
 com.klg.jclass.util.ImageMapInfo getOtherLegendImageMapInfo()
          Retrieves the image map information for the other slice in the legend.
 com.klg.jclass.chart.JCChartStyle getOtherStyle()
          Gets the OtherStyle property, which specifies the style used to render the "other" pie slice.
 int getSortOrder()
          Gets the SortOrder property, which is used to determine the order in which pie slices will be displayed.
 double getStartAngle()
          Gets the StartAngle property, which specifies the angle (in degrees) at which the first pie slice is drawn.
 int getThresholdMethod()
          Gets the ThresholdMethod property of PieChartStyle.
 double getThresholdValue()
          Gets the ThresholdValue property, which is a percentage value (that is, between 0.0 and 100.0).
 void setExplodeList(Point[] pts)
          Sets the ExplodeList property, which specifies a list of exploded pie slices in the pie charts.
 void setExplodeOffset(int offset)
          Sets the ExplodeOffset property, which specifies the distance a slice is exploded from the center of a pie chart.
 void setMinSlices(int min)
          Sets the MinSlices property, which represents the minimum number of pie slices that the chart must display, overriding the the placing of series into the "other" slice.
 void setOtherImageMapInfo(com.klg.jclass.util.ImageMapInfo[] otherImageMapInfo)
          Sets an array of image map information for the other slice, one for each point (i.e.
 void setOtherLabel(String label)
          Sets the OtherLabel property, which represents the label used on the "other" pie slice.
 void setOtherLegendImageMapInfo(com.klg.jclass.util.ImageMapInfo otherLegendImageMapInfo)
          Sets the image map information for the other slice in the legend.
 void setOtherStyle(com.klg.jclass.chart.JCChartStyle style)
          Sets the OtherStyle property, which specifies the style used to render the "other" pie slice.
 void setParent(com.klg.jclass.chart.ChartDataView cdv)
           
 void setSortOrder(int order)
          Gets the SortOrder property, which is used to determine the order in which pie slices will be displayed.
 void setStartAngle(double sa)
          Sets the StartAngle property, which specifies the angle (in degrees) at which the first pie slice is drawn.
 void setThresholdMethod(int meth)
          Sets the ThresholdMethod property of the PieChartStyle.
 void setThresholdValue(double per)
          Sets the ThresholdValue property, which is a percentage value (that is, between 0.0 and 100.0).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

otherLabel

protected String otherLabel

otherStyle

protected com.klg.jclass.chart.JCChartStyle otherStyle

otherImageMapInfo

protected com.klg.jclass.util.ImageMapInfo[] otherImageMapInfo

otherLegendImageMapInfo

protected com.klg.jclass.util.ImageMapInfo otherLegendImageMapInfo

thresholdMethod

protected int thresholdMethod

thresholdValue

protected double thresholdValue

sortOrder

protected int sortOrder

minSlices

protected int minSlices

explodeList

protected Point[] explodeList

explodeOffset

protected int explodeOffset

startAngle

protected double startAngle

parent

protected com.klg.jclass.chart.Changeable parent

SLICE_CUTOFF

public static final int SLICE_CUTOFF
See Also:
Constant Field Values

PIE_PERCENTILE

public static final int PIE_PERCENTILE
See Also:
Constant Field Values

DATA_ORDER

public static final int DATA_ORDER
See Also:
Constant Field Values

ASCENDING_ORDER

public static final int ASCENDING_ORDER
See Also:
Constant Field Values

DESCENDING_ORDER

public static final int DESCENDING_ORDER
See Also:
Constant Field Values

OTHER_SLICE

public static final int OTHER_SLICE
Used to specify the other or all slices of a pie chart.

See Also:
Constant Field Values

ALL

public static final int ALL
See Also:
Constant Field Values
Constructor Detail

JCPieChartFormat

public JCPieChartFormat()

JCPieChartFormat

public JCPieChartFormat(com.klg.jclass.chart.Changeable p)
Method Detail

setParent

public void setParent(com.klg.jclass.chart.ChartDataView cdv)
Specified by:
setParent in interface JCChartTypeFormat

getThresholdMethod

public int getThresholdMethod()
Gets the ThresholdMethod property of PieChartStyle. This property determines how the ThresholdValue property is used. If the method is SLICE_CUTOFF, the ThresholdValue is used as a cutoff to determine what items are lumped into the other slice. If the method is PIE_PERCENTILE, items are grouped into the other slice until it represents "ThresholdValue" percent of the pie.

Returns:
one of SLICE_CUTOFF or PIE_PERCENTILE

setThresholdMethod

public void setThresholdMethod(int meth)
Sets the ThresholdMethod property of the PieChartStyle. This property determines how the ThresholdValue property is used. If the method is SLICE_CUTOFF, the ThresholdValue is used as a cutoff to determine what items are lumped into the other slice. If the method is PIE_PERCENTILE, items are grouped into the other slice until it represents "ThresholdValue" percent of the pie.

Parameters:
meth - one of SLICE_CUTOFF or PIE_PERCENTILE
Throws:
IllegalArgumentException - If the value for ThresholdMethod is not one of SLICE_CUTOFF or PIE_PERCENTILE.

getThresholdValue

public double getThresholdValue()
Gets the ThresholdValue property, which is a percentage value (that is, between 0.0 and 100.0). How this value is used depends on the ThresholdMethod property.

Returns:
percentage value between 0.0 and 100.0
See Also:
getThresholdMethod()

setThresholdValue

public void setThresholdValue(double per)
Sets the ThresholdValue property, which is a percentage value (that is, between 0.0 and 100.0). How this value is used depends on the ThresholdMethod property.

Parameters:
per - percentage value between 0.0 and 100.0
Throws:
IllegalArgumentException - If the new threshold value is less than 0.0 or greater than 100.0.
See Also:
getThresholdMethod()

getSortOrder

public int getSortOrder()
Gets the SortOrder property, which is used to determine the order in which pie slices will be displayed. Note that the "other" slice is always last in any ordering.

Returns:
one of ASCENDING_ORDER, DESCENDING_ORDER, or DATA_ORDER

setSortOrder

public void setSortOrder(int order)
Gets the SortOrder property, which is used to determine the order in which pie slices will be displayed. Note that the "other" slice is always last in any ordering.

Parameters:
order - one of ASCENDING_ORDER, DESCENDING_ORDER, or DATA_ORDER
Throws:
IllegalArgumentException - If the ordering value is not one of ASCENDING_ORDER, DESCENDING_ORDER, or DATA_ORDER.

getMinSlices

public int getMinSlices()
Gets the MinSlices property, which represents the minimum number of pie slices that the chart must display, overriding the placing of series into the "other" slice.

Returns:
a positive integer representing the number of slices to attempt to display

setMinSlices

public void setMinSlices(int min)
Sets the MinSlices property, which represents the minimum number of pie slices that the chart must display, overriding the the placing of series into the "other" slice.

Parameters:
min - a positive integer representing the number of slices to attempt to display

getOtherLabel

public String getOtherLabel()
Gets the OtherLabel property, which represents the label used on the "other" pie slice. It can be unparsed text.

Returns:
text used as the label for the "other" pie slice

setOtherLabel

public void setOtherLabel(String label)
Sets the OtherLabel property, which represents the label used on the "other" pie slice. It can be unparsed text.

Parameters:
label - String used as the label for the "other" pie slice

getOtherStyle

public com.klg.jclass.chart.JCChartStyle getOtherStyle()
Gets the OtherStyle property, which specifies the style used to render the "other" pie slice.

Returns:
JCChartStyle instance outlining rendering information for the "other" slice

setOtherStyle

public void setOtherStyle(com.klg.jclass.chart.JCChartStyle style)
Sets the OtherStyle property, which specifies the style used to render the "other" pie slice.

Parameters:
style - JCChartStyle instance outlining rendering information for the "other" slice

getExplodeList

public Point[] getExplodeList()
Gets the ExplodeList property, which specifies a list of exploded pie slices in the pie charts.

Returns:
an array of Point objects. Each Point object contains the data point index (pie number) in the x value and the series number (slice index) in the y value, specifying the pie slice to explode. If the "other" slice is exploded, the series number returned is OTHER_SLICE. If no slices are exploded, this function will return null.

setExplodeList

public void setExplodeList(Point[] pts)
Sets the ExplodeList property, which specifies a list of exploded pie slices in the pie charts.

Parameters:
pts - an array of Point objects. Each Point object contains the data point index (pie number) in the x value and the series number (slice index) in the y value, specifying the pie slice to explode. To explode the "other" slice, the series number should be OTHER_SLICE. If null, no slices are exploded.

getExplodeOffset

public int getExplodeOffset()
Gets the ExplodeOffset property, which specifies the distance a slice is exploded from the center of a pie chart.

Returns:
The explode offset

setExplodeOffset

public void setExplodeOffset(int offset)
Sets the ExplodeOffset property, which specifies the distance a slice is exploded from the center of a pie chart.

Parameters:
offset - The explode offset

getStartAngle

public double getStartAngle()
Gets the StartAngle property, which specifies the angle (in degrees) at which the first pie slice is drawn. A value of zero represents a horizontal line from the center of the chart to the right edge of the chart. Increasing values move clockwise from there. Only the range of values from zero degrees to 360 degrees is valid.

Returns:
the start angle

setStartAngle

public void setStartAngle(double sa)
Sets the StartAngle property, which specifies the angle (in degrees) at which the first pie slice is drawn. A value of zero represents a horizontal line from the center of the chart to the right edge of the chart. Increasing values move clockwise from there. Only the range of values from zero degrees to 360 degrees is valid.

Parameters:
sa - the start angle

getOtherImageMapInfo

public com.klg.jclass.util.ImageMapInfo[] getOtherImageMapInfo()
Retrieves an array of image map information for the other slice, one for each point (i.e. one for each pie).

Returns:
The current image map information for the other slice.

setOtherImageMapInfo

public void setOtherImageMapInfo(com.klg.jclass.util.ImageMapInfo[] otherImageMapInfo)
Sets an array of image map information for the other slice, one for each point (i.e. one for each pie).

Parameters:
otherImageMapInfo - The image map information for the other slice.

getOtherLegendImageMapInfo

public com.klg.jclass.util.ImageMapInfo getOtherLegendImageMapInfo()
Retrieves the image map information for the other slice in the legend.

Returns:
The current image map information for the other slice in the legend.

setOtherLegendImageMapInfo

public void setOtherLegendImageMapInfo(com.klg.jclass.util.ImageMapInfo otherLegendImageMapInfo)
Sets the image map information for the other slice in the legend.

Parameters:
otherLegendImageMapInfo - The new image map information for the other slice in the legend.

Copyright © 2004 Quest Software Inc..
All rights reserved.