org.jfree.chart.title
Class ShortTextTitle
- Cloneable, Drawable, PublicCloneable, Serializable, Block
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.
Size2D | arrange(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 Size2D | arrangeFN(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 Size2D | arrangeNN(Graphics2D g2) - Arranges the content for this title assuming no bounds on the width
or the height, and returns the required size.
|
protected Size2D | arrangeRN(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 Size2D | arrangeRR(Graphics2D g2, Range widthRange, Range heightRange) - Returns the content size for the title.
|
Object | draw(Graphics2D g2, Rectangle2D area, Object params) - Draws the title using the current font and paint.
|
arrange , arrangeFN , arrangeNN , arrangeRN , arrangeRR , clone , draw , draw , drawHorizontal , drawVertical , equals , getBackgroundPaint , getExpandToFitSpace , getFont , getMaximumLinesToDisplay , getPaint , getText , getTextAlignment , getToolTipText , getURLText , hashCode , setBackgroundPaint , setExpandToFitSpace , setFont , setMaximumLinesToDisplay , setPaint , setText , setTextAlignment , setToolTipText , setURLText |
addChangeListener , clone , draw , equals , getHorizontalAlignment , getNotify , getPosition , getVerticalAlignment , hashCode , notifyListeners , removeChangeListener , setHorizontalAlignment , setNotify , setPosition , setVerticalAlignment |
arrange , arrange , calculateTotalHeight , calculateTotalWidth , clone , drawBorder , equals , 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 |
ShortTextTitle
public ShortTextTitle(String text)
Creates a new title.
text
- the text (null
not permitted).
arrange
public Size2D arrange(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).
- arrange in interface Block
- arrange in interface TextTitle
g2
- the graphics target.constraint
- the layout constraints.
- The dimensions for the title.
arrangeFN
protected Size2D arrangeFN(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.
- arrangeFN in interface TextTitle
g2
- the graphics target.w
- the width.
arrangeNN
protected Size2D arrangeNN(Graphics2D g2)
Arranges the content for this title assuming no bounds on the width
or the height, and returns the required size.
- arrangeNN in interface TextTitle
g2
- the graphics target.
arrangeRN
protected Size2D arrangeRN(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.
- arrangeRN in interface TextTitle
g2
- the graphics target.widthRange
- the range for the width.
arrangeRR
protected Size2D arrangeRR(Graphics2D g2,
Range widthRange,
Range heightRange)
Returns the content size for the title.
- arrangeRR in interface TextTitle
g2
- the graphics device.widthRange
- the width range.heightRange
- the height range.
draw
public Object draw(Graphics2D g2,
Rectangle2D area,
Object params)
Draws the title using the current font and paint.
- draw in interface Block
- draw in interface TextTitle
g2
- the graphics target.area
- the title area.params
- optional parameters (ignored here).