Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| # Header And More
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.chart.title
Class ShortTextTitle

    java.lang.Object
      org.jfree.chart.block.AbstractBlock
          org.jfree.chart.title.Title
              org.jfree.chart.title.TextTitle
                  org.jfree.chart.title.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

Field Summary

Fields inherited from class org.jfree.chart.title.TextTitle
`DEFAULT_FONT, DEFAULT_TEXT_PAINT`

Fields inherited from class org.jfree.chart.title.Title
`DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_PADDING, DEFAULT_POSITION, DEFAULT_VERTICAL_ALIGNMENT, visible`

Constructor Summary
`ShortTextTitle(java.lang.String text)` Creates a new title.

Method Summary
`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).
`protected org.jfree.ui.Size2D` | `arrangeFN(java.awt.Graphics2D g2, double w)` Arranges the content for this title assuming a fixed width and no bounds on the height, and returns the required size.
`protected org.jfree.ui.Size2D` | `arrangeNN(java.awt.Graphics2D g2)` Arranges the content for this title assuming no bounds on the width or the height, and returns the required size.
`protected org.jfree.ui.Size2D` | `arrangeRN(java.awt.Graphics2D g2, Range widthRange)` Arranges the content for this title assuming a range constraint for the width and no bounds on the height, and returns the required size.
`protected org.jfree.ui.Size2D` | `arrangeRR(java.awt.Graphics2D g2, Range widthRange, Range heightRange)` Returns the content size for the title.
`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.

Methods inherited from class org.jfree.chart.title.TextTitle
`clone, draw, drawHorizontal, drawVertical, equals, getBackgroundPaint, getExpandToFitSpace, getFont, getMaximumLinesToDisplay, getPaint, getText, getTextAlignment, getToolTipText, getURLText, hashCode, setBackgroundPaint, setExpandToFitSpace, setFont, setMaximumLinesToDisplay, setPaint, setText, setTextAlignment, setToolTipText, setURLText`

Methods inherited from class org.jfree.chart.title.Title
`addChangeListener, getHorizontalAlignment, getNotify, getPosition, getVerticalAlignment, isVisible, notifyListeners, removeChangeListener, setHorizontalAlignment, setNotify, setPosition, setVerticalAlignment, setVisible`

Methods inherited from class org.jfree.chart.block.AbstractBlock
`arrange, calculateTotalHeight, calculateTotalWidth, drawBorder, getBorder, getBounds, getContentXOffset, getContentYOffset, getFrame, getHeight, getID, getMargin, getPadding, getWidth, setBorder, setBorder, setBounds, setFrame, setHeight, setID, setMargin, setMargin, setPadding, setPadding, setWidth, toContentConstraint, trimBorder, trimMargin, trimPadding, trimToContentHeight, trimToContentWidth`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jfree.chart.block.Block
`arrange, getBounds, getID, setBounds, setID`

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.

### arrangeNN

    protected org.jfree.ui.Size2D arrangeNN(java.awt.Graphics2D g2)

  Arranges the content for this title assuming no bounds on the width or the height, and returns the required size.

  Overrides:
    `arrangeNN` in class `TextTitle`
  Parameters:
    `g2` - the graphics target.
  Returns:
    The content size.

### arrangeRN

    protected org.jfree.ui.Size2D arrangeRN(java.awt.Graphics2D g2,
                                            Range widthRange)

  Arranges the content for this title assuming a range constraint for the width and no bounds on the height, and returns the required size.

  Overrides:
    `arrangeRN` in class `TextTitle`
  Parameters:
    `g2` - the graphics target.
    `widthRange` - the range for the width.
  Returns:
    The content size.

### arrangeFN

    protected org.jfree.ui.Size2D arrangeFN(java.awt.Graphics2D g2,
                                            double w)

  Arranges the content for this title assuming a fixed width and no bounds on the height, and returns the required size. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated by 90 degrees.

  Overrides:
    `arrangeFN` in class `TextTitle`
  Parameters:
    `g2` - the graphics target.
    `w` - the width.
  Returns:
    The content size.

### arrangeRR

    protected org.jfree.ui.Size2D arrangeRR(java.awt.Graphics2D g2,
                                            Range widthRange,
                                            Range heightRange)

  Returns the content size for the title.

  Overrides:
    `arrangeRR` in class `TextTitle`
  Parameters:
    `g2` - the graphics device.
    `widthRange` - the width range.
    `heightRange` - the height range.
  Returns:
    The content size.

### 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`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| # Footer And More
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.