Package com.inet.report.chart
Class ChartTitle
java.lang.Object
com.inet.report.chart.ChartTitle
- All Implemented Interfaces:
Serializable
A chart title that displays a text string with defined font and color.
- Since:
- 8.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChartTitle(Font titleFont, int color) Creates a chart title with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionclone()intgetColor()Returns the ABGR value of color for this title.getFont()Returns the font of the label.getTitle()Returns this title's text.Returns the property formula for the chart title, if it is specified.booleanisEqualToDefault(ChartTitle defaultTitle) Returnstrueif this title is equal to default.booleanReturns whether or not this title is to be an automatically generated label.voidreadProperties(Element element, Chart2 chart) Reads the XML properties of a chart title.voidsaveProperties(StringBuilder buffer, String type, int depth) Writes the properties of the title toPrintWriter.voidsetColor(int titleColor) Sets the ABGR value of color for this title.voidSets the font of the label.voidsetShowAutoTitle(boolean showAutoTitle) Sets whether or not this title is to be an automatically generated label.voidSets this title.
Note: to use this property turn off the showing of auto title.voidsetTitleFormula(FormulaField titleFormula) Sets the formula which returns the title.
-
Field Details
-
TOKEN_HEADER
The XML token for a header title.- See Also:
-
TOKEN_SUBTITLE
The XML token for a subtitle.- See Also:
-
TOKEN_FOOTNOTE
The XML token for a footnote title.- See Also:
-
TOKEN_AXIS
The XML token for an axis title.- See Also:
-
-
Constructor Details
-
ChartTitle
Creates a chart title with the given properties.- Parameters:
titleFont- the title fontcolor- the title color- Since:
- 8.0
-
-
Method Details
-
isShowAutoTitle
public boolean isShowAutoTitle()Returns whether or not this title is to be an automatically generated label.- Returns:
- whether or not this title is to be an automatically generated label
- Since:
- 8.0
- See Also:
-
setShowAutoTitle
public void setShowAutoTitle(boolean showAutoTitle) Sets whether or not this title is to be an automatically generated label.- Parameters:
showAutoTitle- whether or not the title is to be automatically generated- Since:
- 8.0
- See Also:
-
getTitle
Returns this title's text. If this title has been set to show an automatically generated label, this will show the automatically generated text, otherwise this will show the title set with setTitle.- Returns:
- the title text
- Since:
- 8.0
- See Also:
-
setTitle(String)setShowAutoTitle(boolean)setAutoTitle(String)
-
setTitle
Sets this title.
Note: to use this property turn off the showing of auto title.- Parameters:
title- the label (nullnot permitted)- Since:
- 8.0
- See Also:
-
getColor
public int getColor()Returns the ABGR value of color for this title.- Returns:
- the ABGR value representing the label color.
- Since:
- 8.0
- See Also:
-
ColorUtils.toJavaColor(int)setColor(int)
-
setColor
public void setColor(int titleColor) Sets the ABGR value of color for this title.- Parameters:
titleColor- ABGR components of the color- Throws:
IllegalArgumentException- byRDC.COLOR_NO_COLOR.- Since:
- 8.0
- See Also:
-
ColorUtils.toCcColor(Color)getColor()
-
getFont
Returns the font of the label.- Returns:
- the font.
- Since:
- 8.0
- See Also:
-
setFont
Sets the font of the label.- Parameters:
titleFont- the label font (nullnot permitted)- Since:
- 8.0
- See Also:
-
isEqualToDefault
Returnstrueif this title is equal to default.- Parameters:
defaultTitle- the default title- Returns:
trueif equal to default.- Since:
- 8.0
-
saveProperties
Writes the properties of the title toPrintWriter.- Parameters:
buffer- the outputtype- the type of this title: header, footer or subtitledepth- the depth of XML indent- Since:
- 8.0
- See Also:
-
readProperties
Reads the XML properties of a chart title.- Parameters:
element- DOM elementchart- the current chart- Since:
- 8.0
- See Also:
-
clone
-
setTitleFormula
Sets the formula which returns the title. Note that this formula is only used whenshowAutoTitleis off.- Parameters:
titleFormula- the formula foe the title- Since:
- i-net Clear Reports 12.0
-
getTitleFormula
Returns the property formula for the chart title, if it is specified.- Returns:
- the formula or can be null.
- Since:
- i-net Clear Reports 12.0
-