|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.chart.plot.AbstractPlot
com.inet.report.chart.plot.PiePlot
public class PiePlot
A general class for plotting data of groups of values. This plot can
use data from any class that implements the BaseDataset interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.inet.report.chart.plot.AbstractPlot |
|---|
AbstractPlot.GradientSetting |
| Field Summary | |
|---|---|
static double |
DEFAULT_EXPAND_PERCENT
The default expand percent. |
static int |
DEFAULT_ITEM_LABEL_BACKGROUND_COLOR
The default background color of the item label. |
static double |
DEFAULT_ITEM_LABEL_GAP
The default gap of the item labels. |
static int |
DEFAULT_ITEM_LABEL_OUTLINE_COLOR
The default outline color of the item label. |
static int |
DEFAULT_ITEM_LABEL_OUTLINE_STYLE
The default outline style of the item label. |
static int |
DEFAULT_ITEM_LABEL_OUTLINE_WIDTH
The default outline width of the item label. |
static double |
DEFAULT_ROTATION_ANGLE
The default rotating angle. |
static PieStyle |
DEFAULT_STYLE
Default chart style with this plot. |
| Fields inherited from class com.inet.report.chart.plot.AbstractPlot |
|---|
DEFAULT_COLOR_SEQUENCE, DEFAULT_FOREGROUND_ALPHA, DEFAULT_ITEM_LABEL_COLOR, DEFAULT_ITEM_LABEL_FONT, DEFAULT_OUTLINE_COLOR, DEFAULT_OUTLINE_STYLE, DEFAULT_OUTLINE_WIDTH, TOKEN_PLOT |
| Constructor Summary | |
|---|---|
PiePlot()
Creates a pie plot with default properties. |
|
PiePlot(PieStyle style)
Creates a pie plot with defined chart style. |
|
| Method Summary | |
|---|---|
BaseDataset |
getDataset()
Returns a dataset of type PieDataset. |
double |
getExpandPercent()
Returns the detach percentage of sections selected with setSectionIndexes(int[]). |
int |
getItemLabelBackColor()
Returns the ABGR value representing the background color of item labels . |
double |
getItemLabelGap()
Returns the gap between the pie and the item label. |
int |
getItemLabelOutlineColor()
Returns the ABGR value representing the legend outline color. |
int |
getItemLabelOutlineStyle()
Returns the border line style of item labels. |
int |
getItemLabelOutlineWidth()
Returns the outline width of item labels. |
PieLegendLayout |
getLegendLayout()
Returns the legend layout. |
double |
getRotationAngle()
Returns the rotation angle of pie. |
int[] |
getSectionIndexes()
Returns the sections indexes which will be expanded. |
ChartStyle |
getStyle()
Returns the style of this chart, ie. the general category this plot belongs to. |
protected java.lang.StringBuffer |
getSubProperties(int depth)
Returns the serialized simple properties of subclasses. |
boolean |
isDrawItemLabelOutline()
Returns whether or not to draw the item label outline. |
boolean |
isIgnoreZeroValues()
Returns the flag that controls whether or not the null and zero values will be ignored. |
protected void |
readDataset(org.w3c.dom.Element element,
Chart2 chart)
Reads the dataset properties from DOM element. |
void |
readProperties(org.w3c.dom.Element element,
Chart2 chart)
Reads the chart properties from the DOMParser Element. |
void |
refreshAutoTitles(Chart2 chart)
Reads out the data column names from dataset and refreshes the chart labels. |
protected void |
saveSubProperties(java.io.PrintWriter out,
int depth)
Writes the intern properties to output. |
void |
setDataset(PieDataset dataset)
Sets a pie dataset for this chart. |
void |
setDrawItemLabelOutline(boolean drawOutline)
Sets whether or not to draw the item label outline. |
void |
setExpandPercent(double expandPercent)
Sets the detach percentage of sections selected with setSectionIndexes(int[]). |
void |
setIgnoreZeroValues(boolean ignoreZeroValues)
Sets the flag that controls whether or not the null and zero values will be ignored. |
void |
setItemLabelBackColor(int backgroundColor)
Sets the ABGR value representing the background color of item labels. |
void |
setItemLabelGap(double itemLabelGap)
Sets the gap between the pie and the item label. |
void |
setItemLabelOutlineColor(int outlineColor)
Sets the ABGR components of the legend outline color. |
void |
setItemLabelOutlineStyle(int itemLabelOutlineStyle)
Sets the border line style of item labels. |
void |
setItemLabelOutlineWidth(int itemLabelOutlineWidth)
Sets the item labels outline width in twips. |
void |
setLegendLayout(PieLegendLayout legendLayout)
Sets the legend layout. |
void |
setRotationAngle(double rotationAngle)
Sets the rotation angle of pie. |
void |
setSectionIndexes(int[] sectionIndexes)
Sets the sections indexes which will be expanded. |
void |
setStyle(PieStyle style)
Sets the chart style of this plot. |
| Field Detail |
|---|
public static final PieStyle DEFAULT_STYLE
public static final double DEFAULT_ROTATION_ANGLE
public static final double DEFAULT_ITEM_LABEL_GAP
public static final int DEFAULT_ITEM_LABEL_BACKGROUND_COLOR
public static final int DEFAULT_ITEM_LABEL_OUTLINE_COLOR
public static final int DEFAULT_ITEM_LABEL_OUTLINE_STYLE
public static final int DEFAULT_ITEM_LABEL_OUTLINE_WIDTH
public static final double DEFAULT_EXPAND_PERCENT
| Constructor Detail |
|---|
public PiePlot()
public PiePlot(PieStyle style)
style - the chart style (null not permitted)PieStyle| Method Detail |
|---|
public BaseDataset getDataset()
PieDataset.
setDataset(PieDataset),
ForAllRecordsDataset,
ForEachRecordDataset,
OneGroupDatasetpublic void setDataset(PieDataset dataset)
dataset - the pie dataset (null not permitted)getDataset(),
PieDataset,
ForAllRecordsDataset,
ForEachRecordDataset,
OneGroupDatasetpublic ChartStyle getStyle()
getStyle in class AbstractPlotBarStyle.BAR2D,
LineStyle.LINE_MARKER,
AreaStyle.AREA2D_STACKEDpublic void setStyle(PieStyle style)
style - the stylegetStyle(),
PieStylepublic boolean isIgnoreZeroValues()
false.
setIgnoreZeroValues(boolean)public void setIgnoreZeroValues(boolean ignoreZeroValues)
false.
ignoreZeroValues - the flagisIgnoreZeroValues()public double getRotationAngle()
setRotationAngle(double)public void setRotationAngle(double rotationAngle)
DEFAULT_ROTATION_ANGLE
rotationAngle - the rotation anglegetRotationAngle()public double getItemLabelGap()
setItemLabelGap(double)public void setItemLabelGap(double itemLabelGap)
DEFAULT_ITEM_LABEL_GAP.
itemLabelGap - the item label gap
java.lang.IllegalArgumentException - if the gap is a negative value.getItemLabelGap()public boolean isDrawItemLabelOutline()
true the outline is to be drawn.setDrawItemLabelOutline(boolean)public void setDrawItemLabelOutline(boolean drawOutline)
drawOutline - true if outline is to be drawn.isDrawItemLabelOutline()public int getItemLabelBackColor()
setItemLabelBackColor(int),
RDC.toJavaColor(int)public void setItemLabelBackColor(int backgroundColor)
backgroundColor - the background colorgetItemLabelBackColor(),
RDC.toCcColor(Color)public int getItemLabelOutlineColor()
AbstractPlot.setOutlineColor(int),
RDC.toJavaColor(int)public void setItemLabelOutlineColor(int outlineColor)
outlineColor - a color
java.lang.IllegalArgumentException - if the color is RDC.COLOR_NO_COLOR.AbstractPlot.getOutlineColor(),
RDC.toCcColor(Color)public int getItemLabelOutlineStyle()
setItemLabelOutlineStyle(int)public void setItemLabelOutlineStyle(int itemLabelOutlineStyle)
itemLabelOutlineStyle - a outline style
java.lang.IllegalArgumentException - by unsupported line style.getItemLabelOutlineStyle(),
BorderProperties.LINE_STYLE_DASHED,
BorderProperties.LINE_STYLE_DOTTED,
BorderProperties.LINE_STYLE_SINGLE,
BorderProperties.NO_LINEpublic int getItemLabelOutlineWidth()
setItemLabelOutlineWidth(int)public void setItemLabelOutlineWidth(int itemLabelOutlineWidth)
itemLabelOutlineWidth - the outline width
java.lang.IllegalArgumentException - if width is less than 1.getItemLabelOutlineWidth()public PieLegendLayout getLegendLayout()
setLegendLayout(PieLegendLayout),
PieLegendLayoutpublic void setLegendLayout(PieLegendLayout legendLayout)
legendLayout - a legend layout (null not permitted)getLegendLayout(),
PieLegendLayoutpublic int[] getSectionIndexes()
setSectionIndexes(int[])public void setSectionIndexes(int[] sectionIndexes)
setExpandPercent(double).
The array of indexes is 0 based.
sectionIndexes - the array of sections indexes (null not permitted)
java.lang.IllegalArgumentException - if the array is null.getSectionIndexes(),
setExpandPercent(double)public double getExpandPercent()
setSectionIndexes(int[]).
setExpandPercent(double)public void setExpandPercent(double expandPercent)
setSectionIndexes(int[]).
expandPercent - the expand percentage (0.30 = 30 percent)
java.lang.IllegalArgumentException - if the percent is a negative value.getExpandPercent(),
setSectionIndexes(int[])public void refreshAutoTitles(Chart2 chart)
refreshAutoTitles in interface ChartPlotrefreshAutoTitles in class AbstractPlotchart - the chartprotected java.lang.StringBuffer getSubProperties(int depth)
getSubProperties in class AbstractPlotdepth - the depth of XML indent
protected void saveSubProperties(java.io.PrintWriter out,
int depth)
PrintWriter without building a StringBuffer.
saveSubProperties in class AbstractPlotout - the outputdepth - the depth of XML indent
public void readProperties(org.w3c.dom.Element element,
Chart2 chart)
readProperties in interface ChartPlotreadProperties in class AbstractPlotelement - the DOMParser Elementchart - the chart
protected void readDataset(org.w3c.dom.Element element,
Chart2 chart)
element - the DOM elementchart - the chart
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||