Class TitleEntity

java.lang.Object
org.jfree.chart.entity.ChartEntity
org.jfree.chart.entity.TitleEntity
All Implemented Interfaces:
Serializable, Cloneable, PublicCloneable

public class TitleEntity extends ChartEntity
A class that captures information about a Title of a chart.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For serialization.
      See Also:
    • title

      private Title title
      The Title for the entity.
  • Constructor Details

    • TitleEntity

      public TitleEntity(Shape area, Title title)
      Creates a new chart entity.
      Parameters:
      area - the area (null not permitted).
      title - the title (null not permitted).
    • TitleEntity

      public TitleEntity(Shape area, Title title, String toolTipText)
      Creates a new chart entity.
      Parameters:
      area - the area (null not permitted).
      title - the title (null not permitted).
      toolTipText - the tool tip text (null permitted).
    • TitleEntity

      public TitleEntity(Shape area, Title title, String toolTipText, String urlText)
      Creates a new entity.
      Parameters:
      area - the area (null not permitted).
      title - the title (null not permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text for HTML image maps (null permitted).
  • Method Details

    • getTitle

      public Title getTitle()
      Returns the title that occupies the entity area.
      Returns:
      The title (never null).
    • toString

      public String toString()
      Returns a string representation of the chart entity, useful for debugging.
      Overrides:
      toString in class ChartEntity
      Returns:
      A string.
    • equals

      public boolean equals(Object obj)
      Tests the entity for equality with an arbitrary object.
      Overrides:
      equals in class ChartEntity
      Parameters:
      obj - the object to test against (null permitted).
      Returns:
      A boolean.
    • canEqual

      public boolean canEqual(Object other)
      Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.
      Overrides:
      canEqual in class ChartEntity
      Parameters:
      other - Object
      Returns:
      true ONLY if the parameter is THIS class type
    • hashCode

      public int hashCode()
      Returns a hash code for this instance.
      Overrides:
      hashCode in class ChartEntity
      Returns:
      A hash code.
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a clone of the entity.
      Specified by:
      clone in interface PublicCloneable
      Overrides:
      clone in class ChartEntity
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - if there is a problem cloning the entity.
    • writeObject

      private void writeObject(ObjectOutputStream stream) throws IOException
      Provides serialization support.
      Parameters:
      stream - the output stream.
      Throws:
      IOException - if there is an I/O error.
    • readObject

      private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
      Provides serialization support.
      Parameters:
      stream - the input stream.
      Throws:
      IOException - if there is an I/O error.
      ClassNotFoundException - if there is a classpath problem.