Class ChartTitle

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

public class ChartTitle extends Object implements Serializable
A chart title that displays a text string with defined font and color.
Since:
8.0
See Also:
  • Field Details

  • Constructor Details

    • ChartTitle

      public ChartTitle(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 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

      public 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

      public void setTitle(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:
    • 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:
    • setColor

      public void setColor(int titleColor)
      Sets the ABGR value of color for this title.
      Parameters:
      titleColor - ABGR components of the color
      Throws:
      IllegalArgumentException - by RDC.COLOR_NO_COLOR.
      Since:
      8.0
      See Also:
    • getFont

      public Font getFont()
      Returns the font of the label.
      Returns:
      the font.
      Since:
      8.0
      See Also:
    • setFont

      public void setFont(Font titleFont)
      Sets the font of the label.
      Parameters:
      titleFont - the label font (null not permitted)
      Since:
      8.0
      See Also:
    • 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(StringBuilder buffer, 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:
    • readProperties

      public void readProperties(Element element, Chart2 chart)
      Reads the XML properties of a chart title.
      Parameters:
      element - DOM element
      chart - the current chart
      Since:
      8.0
      See Also:
    • clone

      public ChartTitle clone()
      Overrides:
      clone in class Object
    • setTitleFormula

      public void setTitleFormula(FormulaField titleFormula)
      Sets the formula which returns the title. Note that this formula is only used when showAutoTitle is off.
      Parameters:
      titleFormula - the formula foe the title
      Since:
      i-net Clear Reports 12.0
    • getTitleFormula

      public FormulaField 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