Documentation of 'org.jfree.chart.title.ShortTextTitle' Java class
ShortTextTitle
org.jfree.chart.title

Class ShortTextTitle

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Block, org.jfree.ui.Drawable, org.jfree.util.PublicCloneable


    public class ShortTextTitle
    extends TextTitle
    A text title that is only displayed if the entire text will be visible without line wrapping. It is only intended for use with short titles - for general purpose titles, you should use the TextTitle class.
    Since:
    1.0.10
    See Also:
    TextTitle, Serialized Form
    • Constructor Detail

      • ShortTextTitle

        public ShortTextTitle(java.lang.String text)
        Creates a new title.
        Parameters:
        text - the text (null not permitted).
    • Method Detail

      • arrange

        public org.jfree.ui.Size2D arrange(java.awt.Graphics2D g2,
                                           RectangleConstraint constraint)
        Performs a layout for this title, subject to the supplied constraint, and returns the dimensions required for the title (if the title cannot be displayed in the available space, this method will return zero width and height for the dimensions).
        Specified by:
        arrange in interface Block
        Overrides:
        arrange in class TextTitle
        Parameters:
        g2 - the graphics target.
        constraint - the layout constraints.
        Returns:
        The dimensions for the title.
      • draw

        public java.lang.Object draw(java.awt.Graphics2D g2,
                                     java.awt.geom.Rectangle2D area,
                                     java.lang.Object params)
        Draws the title using the current font and paint.
        Specified by:
        draw in interface Block
        Overrides:
        draw in class TextTitle
        Parameters:
        g2 - the graphics target.
        area - the title area.
        params - optional parameters (ignored here).
        Returns:
        null.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.