|
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
public abstract class AbstractPlot
A general plotting class with common properties used by all chart plots.
| Nested Class Summary | |
|---|---|
static class |
AbstractPlot.GradientSetting
The gradient paint setting for the colorization of the chart items. |
| Field Summary | |
|---|---|
static java.awt.Color[] |
DEFAULT_COLOR_SEQUENCE
The default order of colors. |
static float |
DEFAULT_FOREGROUND_ALPHA
The default foreground alpha |
static int |
DEFAULT_ITEM_LABEL_COLOR
Default color of the item labels. |
static java.awt.Font |
DEFAULT_ITEM_LABEL_FONT
Default font of the item labels. |
static int |
DEFAULT_OUTLINE_COLOR
Default outline color. |
static int |
DEFAULT_OUTLINE_STYLE
Default outline style. |
static int |
DEFAULT_OUTLINE_WIDTH
Default outline width. |
static java.lang.String |
TOKEN_PLOT
XML token for a plot element. |
| Method Summary | |
|---|---|
int |
getBackColor()
Returns the ABGR value representing the background color. |
FormulaField |
getColorFormula()
Returns the color formula which determines the color at run-time. |
java.awt.Color[] |
getColorSequence()
Returns the user defined color sequence of this chart plot. |
float |
getForegroundAlpha()
Returns the alpha value for the foreground color: 1.0 is fully opaque, while 0.0 is fully transparent. |
AbstractPlot.GradientSetting |
getGradientSetting()
Returns the gradient paint settings. |
int |
getItemLabelColor()
Returns the ABGR value representing the color of the item labels. |
java.awt.Font |
getItemLabelFont()
Returns font for the item labels. |
ChartFormat |
getItemLabelFormat()
Returns the format for the item value. |
ItemShape |
getItemShape()
Returns the item shape settings for this plot. |
int |
getOutlineColor()
Returns the ABGR value representing the chart items outline color. |
int |
getOutlineStyle()
Returns the chart items' outline style. |
int |
getOutlineWidth()
Returns the chart outline's width. |
java.util.List |
getReferencedObject()
Returns a list of referenced i-net Clear Reports objects: Field or Group |
abstract 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 |
isColorBySeries()
Returns whether the chart items are colored by series or by groups. |
boolean |
isDrawOutline()
Returns whether or not to draw the outline. |
boolean |
isSameColorsForSameGroups()
Returns whether identical groups will have the same color. |
boolean |
isShowLabel()
Returns whether or not to show labels in the plot. |
boolean |
isShowValue()
Returns whether or not to show the values in the plot. |
void |
readProperties(org.w3c.dom.Element element,
Chart2 chart)
Reads the chart properties from the DOMParser Element. |
abstract void |
refreshAutoTitles(Chart2 chart)
Reads out the data column names from dataset and refreshes the chart labels. |
void |
saveProperties(java.io.PrintWriter out,
int depth)
Writes the properties of this chart plot to PrintWriter. |
protected void |
saveSubProperties(java.io.PrintWriter out,
int depth)
Writes the intern properties to output. |
void |
setBackColor(int backgroundColor)
Sets the ABGR value representing the background color. |
void |
setColorBySeries(boolean colorBySeries)
Sets whether the chart items are colored by series or by groups. |
void |
setColorFormula(FormulaField colorFormula)
Sets the color formula which determines the color at run-time. |
void |
setColorSequence(java.awt.Color[] colorSequence)
Sets the user defined color sequence for this chart plot. |
void |
setDrawOutline(boolean drawOutline)
Sets whether or not to draw the outline. |
void |
setForegroundAlpha(float foregroundAlpha)
Sets the alpha (opaqueness) value for the foreground color: 1.0 is fully opaque, while 0.0 is fully transparent. |
void |
setGradientSetting(AbstractPlot.GradientSetting gradientSetting)
Sets the gradient paint settings. |
void |
setItemLabelColor(int itemLabelColor)
Sets the ABGR value representing the color of the item labels. |
void |
setItemLabelFont(java.awt.Font itemLabelFont)
Sets the font of the item labels. |
void |
setItemLabelFormat(ChartFormat valueFormat)
Sets the format for the item value. |
void |
setItemShape(ItemShape itemShape)
Sets the item shape properties for this plot. |
void |
setOutlineColor(int outlineColor)
Sets the ABGR components of the chart items outline color. |
void |
setOutlineStyle(int outlineStyle)
Sets the chart items' outline style. |
void |
setOutlineWidth(int outlineWidth)
Sets the chart items' outline width (in twips). |
void |
setSameColorsForSameGroups(boolean sameColorsForSameGroups)
Sets whether identical groups will have the same color. |
void |
setShowLabel(boolean showLabel)
Sets whether or not to show labels in the plot. |
void |
setShowValue(boolean showValue)
Sets whether or not to show the values in the plot. |
| Methods inherited from interface com.inet.report.chart.plot.ChartPlot |
|---|
getDataset |
| Field Detail |
|---|
public static final java.lang.String TOKEN_PLOT
public static final java.awt.Color[] DEFAULT_COLOR_SEQUENCE
public static final float DEFAULT_FOREGROUND_ALPHA
public static final java.awt.Font DEFAULT_ITEM_LABEL_FONT
public static final int DEFAULT_ITEM_LABEL_COLOR
public static final int DEFAULT_OUTLINE_STYLE
public static final int DEFAULT_OUTLINE_WIDTH
public static final int DEFAULT_OUTLINE_COLOR
| Method Detail |
|---|
public int getBackColor()
setBackColor(int),
RDC.toJavaColor(int)public void setBackColor(int backgroundColor)
backgroundColor - the background colorgetBackColor(),
RDC.toCcColor(Color)public ItemShape getItemShape()
setItemShape(ItemShape),
ItemShapepublic void setItemShape(ItemShape itemShape)
itemShape - the properties object (null not permitted)getItemShape(),
ItemShapepublic int getOutlineColor()
setOutlineColor(int),
RDC.toJavaColor(int)public void setOutlineColor(int outlineColor)
outlineColor - the chart items' outline color
java.lang.IllegalArgumentException - if the color is RDC.COLOR_NO_COLOR.getOutlineColor(),
RDC.toCcColor(Color)public int getOutlineStyle()
BorderProperties.LINE_STYLE_DASHED,
BorderProperties.LINE_STYLE_DOTTED,
BorderProperties.LINE_STYLE_SINGLE,
BorderProperties.NO_LINEpublic void setOutlineStyle(int outlineStyle)
outlineStyle - the style
java.lang.IllegalArgumentException - if the parameter is not one of the supported outline stylesgetOutlineStyle(),
BorderProperties.LINE_STYLE_DASHED,
BorderProperties.LINE_STYLE_DOTTED,
BorderProperties.LINE_STYLE_SINGLE,
BorderProperties.NO_LINEpublic int getOutlineWidth()
public void setOutlineWidth(int outlineWidth)
outlineWidth - the outline width of the chart items
java.lang.IllegalArgumentException - if width is less than 1.public boolean isDrawOutline()
true the outline is to be drawn.public void setDrawOutline(boolean drawOutline)
drawOutline - true if outline is to be drawn.public boolean isShowLabel()
true if labels are to be shown.public void setShowLabel(boolean showLabel)
showLabel - true if labels are to be shown.public boolean isShowValue()
true if values are to be shown.public void setShowValue(boolean showValue)
showValue - set true if values are to be shown.public ChartFormat getItemLabelFormat()
setItemLabelFormat(ChartFormat)public void setItemLabelFormat(ChartFormat valueFormat)
null, which means that
the values are to be formatted automatically.
Note: for chart with number values, only formats extended from NumberFormat are allowed,
while for date charts, only formats extended from DateFormat are allowed.
valueFormat - the format (null permitted)getItemLabelFormat()public boolean isSameColorsForSameGroups()
true if the same color is to be used for identical groups.public void setSameColorsForSameGroups(boolean sameColorsForSameGroups)
sameColorsForSameGroups - true if the same color is to be used for identical groups.public FormulaField getColorFormula()
null if there is none.setColorFormula(FormulaField),
FormulaFieldpublic void setColorFormula(FormulaField colorFormula)
FormulaField.FORMULA_PROPERTY.
colorFormula - the color formula (null permitted)
java.lang.IllegalArgumentException - if the formula has the wrong type.getColorFormula(),
Fields.addFormulaField(String, String, int),
FormulaField,
FormulaField.getFormulaType()public java.awt.Color[] getColorSequence()
DEFAULT_COLOR_SEQUENCE.
null which means the default
color sequence will be usedsetColorSequence(Color[])public void setColorSequence(java.awt.Color[] colorSequence)
DEFAULT_COLOR_SEQUENCE.
colorSequence - the array of colors (null permitted)
java.lang.IllegalArgumentException - if an empty color sequence is passedgetColorSequence(),
DEFAULT_COLOR_SEQUENCEpublic AbstractPlot.GradientSetting getGradientSetting()
null without gradient paint for chart itemspublic void setGradientSetting(AbstractPlot.GradientSetting gradientSetting)
gradientSetting - the gradient paint for the chart items (null permitted)public boolean isColorBySeries()
setColorBySeries(boolean)public void setColorBySeries(boolean colorBySeries)
colorBySeries - true if the chart items are colored according to their series, and false if the chart items are colored according to their groupsisColorBySeries()public float getForegroundAlpha()
public void setForegroundAlpha(float foregroundAlpha)
foregroundAlpha - the alpha value for the foreground color
java.lang.IllegalArgumentException - if foregroundAlpha is less than 0.0 or greater than 1.0.public java.awt.Font getItemLabelFont()
setItemLabelFont(Font)public void setItemLabelFont(java.awt.Font itemLabelFont)
itemLabelFont - the font (null not permitted)getItemLabelFont()public int getItemLabelColor()
RDC.toJavaColor(int) to
convert this value to a Java Color.
RDC.toJavaColor(int),
setItemLabelColor(int)public void setItemLabelColor(int itemLabelColor)
RDC.toCcColor(Color) to
convert a Java color to an int value.
itemLabelColor - ABGR components of the item labels' color
java.lang.IllegalArgumentException - if RDC.COLOR_NO_COLOR is passed.RDC.toCcColor(Color),
getItemLabelColor()public abstract void refreshAutoTitles(Chart2 chart)
refreshAutoTitles in interface ChartPlotchart - the chartpublic abstract ChartStyle getStyle()
BarStyle.BAR2D,
LineStyle.LINE_MARKER,
AreaStyle.AREA2D_STACKEDpublic java.util.List getReferencedObject()
Field or Group
getReferencedObject in interface ChartPlot
public void saveProperties(java.io.PrintWriter out,
int depth)
PrintWriter.
saveProperties in interface ChartPlotout - the outputdepth - the depth of XML indentprotected java.lang.StringBuffer getSubProperties(int depth)
depth - the depth of XML indent
protected void saveSubProperties(java.io.PrintWriter out,
int depth)
PrintWriter without building a StringBuffer.
out - the outputdepth - the depth of XML indent
public void readProperties(org.w3c.dom.Element element,
Chart2 chart)
readProperties in interface ChartPlotelement - the DOMParser Elementchart - the chart
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||