public class ChartTitle
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TOKEN_AXIS
The XML token for an axis title.
|
static java.lang.String |
TOKEN_FOOTNOTE
The XML token for a footnote title.
|
static java.lang.String |
TOKEN_HEADER
The XML token for a header title.
|
static java.lang.String |
TOKEN_SUBTITLE
The XML token for a subtitle.
|
Constructor and Description |
---|
ChartTitle(java.awt.Font titleFont,
int color)
Creates a chart title with the given properties.
|
Modifier and Type | Method and Description |
---|---|
int |
getColor()
Returns the ABGR value of color for this title.
|
java.awt.Font |
getFont()
Returns the font of the label.
|
java.lang.String |
getTitle()
Returns this title's text.
|
FormulaField |
getTitleFormula()
Returns the property formula for the chart title, if it is specified.
|
boolean |
isEqualToDefault(ChartTitle defaultTitle)
Returns
true if this title is equal to default. |
boolean |
isShowAutoTitle()
Returns whether or not this title is to be an automatically generated label.
|
void |
readProperties(org.w3c.dom.Element element,
Chart2 chart)
Reads the XML properties of a chart title.
|
void |
saveProperties(java.lang.StringBuilder buffer,
java.lang.String type,
int depth)
Writes the properties of the title to
PrintWriter . |
void |
setColor(int titleColor)
Sets the ABGR value of color for this title.
|
void |
setFont(java.awt.Font titleFont)
Sets the font of the label.
|
void |
setShowAutoTitle(boolean showAutoTitle)
Sets whether or not this title is to be an automatically generated label.
|
void |
setTitle(java.lang.String title)
Sets this title.
|
void |
setTitleFormula(FormulaField titleFormula)
Sets the formula which returns the title.
|
public static final java.lang.String TOKEN_HEADER
public static final java.lang.String TOKEN_SUBTITLE
public static final java.lang.String TOKEN_FOOTNOTE
public static final java.lang.String TOKEN_AXIS
public ChartTitle(java.awt.Font titleFont, int color)
titleFont
- the title fontcolor
- the title colorpublic boolean isShowAutoTitle()
setShowAutoTitle(boolean)
public void setShowAutoTitle(boolean showAutoTitle)
showAutoTitle
- whether or not the title is to be automatically generatedisShowAutoTitle()
public java.lang.String getTitle()
setTitle(String)
,
setShowAutoTitle(boolean)
,
setAutoTitle(String)
public void setTitle(java.lang.String title)
title
- the label (null
not permitted)getTitle()
,
setShowAutoTitle(boolean)
public int getColor()
ColorUtils.toJavaColor(int)
,
setColor(int)
public void setColor(int titleColor)
titleColor
- ABGR components of the colorjava.lang.IllegalArgumentException
- by RDC.COLOR_NO_COLOR
.ColorUtils.toCcColor(Color)
,
getColor()
public java.awt.Font getFont()
setFont(Font)
public void setFont(java.awt.Font titleFont)
titleFont
- the label font (null
not permitted)getFont()
public boolean isEqualToDefault(ChartTitle defaultTitle)
true
if this title is equal to default.defaultTitle
- the default titletrue
if equal to default.public void saveProperties(java.lang.StringBuilder buffer, java.lang.String type, int depth)
PrintWriter
.buffer
- the outputtype
- the type of this title: header, footer or subtitledepth
- the depth of XML indentTOKEN_HEADER
,
TOKEN_FOOTNOTE
,
TOKEN_SUBTITLE
public void readProperties(org.w3c.dom.Element element, Chart2 chart)
element
- DOM elementchart
- the current chartsaveProperties(StringBuilder, String, int)
public void setTitleFormula(FormulaField titleFormula)
showAutoTitle
is
off.titleFormula
- the formula foe the titlepublic FormulaField getTitleFormula()
Copyright © 1999-2020 by i-net software GmbH