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
-
Constructor Summary
ConstructorDescriptionChartTitle
(Font titleFont, int color) Creates a chart title with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
getColor()
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.boolean
isEqualToDefault
(ChartTitle defaultTitle) Returnstrue
if this title is equal to default.boolean
Returns whether or not this title is to be an automatically generated label.void
readProperties
(Element element, Chart2 chart) Reads the XML properties of a chart title.void
saveProperties
(StringBuilder buffer, String type, int depth) Writes the properties of the title toPrintWriter
.void
setColor
(int titleColor) Sets the ABGR value of color for this title.void
Sets the font of the label.void
setShowAutoTitle
(boolean showAutoTitle) Sets whether or not this title is to be an automatically generated label.void
Sets this title.
Note: to use this property turn off the showing of auto title.void
setTitleFormula
(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 (null
not 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 (null
not permitted)- Since:
- 8.0
- See Also:
-
isEqualToDefault
Returnstrue
if this title is equal to default.- Parameters:
defaultTitle
- the default title- Returns:
true
if 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 whenshowAutoTitle
is 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
-