i-net Clear Reports

com.inet.report.chart
Class ChartTitle

java.lang.Object
  extended by com.inet.report.chart.ChartTitle
All Implemented Interfaces:
java.io.Serializable

public class ChartTitle
extends java.lang.Object
implements java.io.Serializable

A chart title that displays a text string with defined font and color.

Since:
8.0
See Also:
Serialized Form

Field Summary
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 Summary
ChartTitle(java.awt.Font titleFont, int color)
          Creates a chart title with the given properties.
 
Method Summary
 ChartTitle clone()
          
 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.
 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)
          Reads the XML properties of a chart title.
 void saveProperties(java.lang.StringBuffer 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.
 

Field Detail

TOKEN_HEADER

public static final java.lang.String TOKEN_HEADER
The XML token for a header title.

See Also:
Constant Field Values

TOKEN_SUBTITLE

public static final java.lang.String TOKEN_SUBTITLE
The XML token for a subtitle.

See Also:
Constant Field Values

TOKEN_FOOTNOTE

public static final java.lang.String TOKEN_FOOTNOTE
The XML token for a footnote title.

See Also:
Constant Field Values

TOKEN_AXIS

public static final java.lang.String TOKEN_AXIS
The XML token for an axis title.

See Also:
Constant Field Values
Constructor Detail

ChartTitle

public ChartTitle(java.awt.Font titleFont,
                  int color)
Creates a chart title with the given properties.

Parameters:
titleFont - the title font
color - the title color
Since:
8.0
Method Detail

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(boolean)

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:
isShowAutoTitle()

getTitle

public java.lang.String 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

public void setTitle(java.lang.String title)
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:
getTitle(), setShowAutoTitle(boolean)

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:
RDC.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:
java.lang.IllegalArgumentException - by RDC.COLOR_NO_COLOR.
Since:
8.0
See Also:
RDC.toCcColor(Color), getColor()

getFont

public java.awt.Font getFont()
Returns the font of the label.

Returns:
the font.
Since:
8.0
See Also:
setFont(Font)

setFont

public void setFont(java.awt.Font titleFont)
Sets the font of the label.

Parameters:
titleFont - the label font (null not permitted)
Since:
8.0
See Also:
getFont()

isEqualToDefault

public boolean isEqualToDefault(ChartTitle defaultTitle)
Returns true if this title is equal to default.

Parameters:
defaultTitle - the default title
Returns:
true if equal to default.
Since:
8.0

saveProperties

public void saveProperties(java.lang.StringBuffer buffer,
                           java.lang.String type,
                           int depth)
Writes the properties of the title to PrintWriter.

Parameters:
buffer - the output
type - the type of this title: header, footer or subtitle
depth - the depth of XML indent
Since:
8.0
See Also:
TOKEN_HEADER, TOKEN_FOOTNOTE, TOKEN_SUBTITLE

readProperties

public void readProperties(org.w3c.dom.Element element)
Reads the XML properties of a chart title.

Parameters:
element - DOM element
Since:
8.0
See Also:
saveProperties(StringBuffer, String, int)

clone

public ChartTitle clone()

Overrides:
clone in class java.lang.Object

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH