|
Header
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.chart.block.AbstractBlock
org.jfree.chart.title.Title
org.jfree.chart.title.TextTitle
public class TextTitle
A chart title that displays a text string with automatic wrapping as required.
| Field Summary | |
|---|---|
static java.awt.Font |
DEFAULT_FONT
The default font. |
static java.awt.Paint |
DEFAULT_TEXT_PAINT
The default text color. |
| Fields inherited from class org.jfree.chart.title.Title |
|---|
DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_PADDING, DEFAULT_POSITION, DEFAULT_VERTICAL_ALIGNMENT, visible |
| Constructor Summary | |
|---|---|
TextTitle()
Creates a new title, using default attributes where necessary. |
|
TextTitle(java.lang.String text)
Creates a new title, using default attributes where necessary. |
|
TextTitle(java.lang.String text,
java.awt.Font font)
Creates a new title, using default attributes where necessary. |
|
TextTitle(java.lang.String text,
java.awt.Font font,
java.awt.Paint paint,
org.jfree.ui.RectangleEdge position,
org.jfree.ui.HorizontalAlignment horizontalAlignment,
org.jfree.ui.VerticalAlignment verticalAlignment,
org.jfree.ui.RectangleInsets padding)
Creates a new title. |
|
| Method Summary | |
|---|---|
org.jfree.ui.Size2D |
arrange(java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and returns the block size. |
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 |
clone()
Returns a clone of this object. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws the title on a Java 2D graphics device (such as the screen or a printer). |
java.lang.Object |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
java.lang.Object params)
Draws the block within the specified area. |
protected void |
drawHorizontal(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws a the title horizontally within the specified area. |
protected void |
drawVertical(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws a the title vertically within the specified area. |
boolean |
equals(java.lang.Object obj)
Tests this title for equality with another object. |
java.awt.Paint |
getBackgroundPaint()
Returns the background paint. |
boolean |
getExpandToFitSpace()
Returns the flag that controls whether or not the title expands to fit the available space. |
java.awt.Font |
getFont()
Returns the font used to display the title string. |
int |
getMaximumLinesToDisplay()
Returns the maximum number of lines to display. |
java.awt.Paint |
getPaint()
Returns the paint used to display the title string. |
java.lang.String |
getText()
Returns the title text. |
org.jfree.ui.HorizontalAlignment |
getTextAlignment()
Returns the text alignment. |
java.lang.String |
getToolTipText()
Returns the tool tip text. |
java.lang.String |
getURLText()
Returns the URL text. |
int |
hashCode()
Returns a hash code. |
void |
setBackgroundPaint(java.awt.Paint paint)
Sets the background paint and sends a TitleChangeEvent to all
registered listeners. |
void |
setExpandToFitSpace(boolean expand)
Sets the flag that controls whether the title expands to fit the available space, and sends a TitleChangeEvent to all registered
listeners. |
void |
setFont(java.awt.Font font)
Sets the font used to display the title string. |
void |
setMaximumLinesToDisplay(int max)
Sets the maximum number of lines to display and sends a TitleChangeEvent to all registered listeners. |
void |
setPaint(java.awt.Paint paint)
Sets the paint used to display the title string. |
void |
setText(java.lang.String text)
Sets the title to the specified text and sends a TitleChangeEvent to all registered listeners. |
void |
setTextAlignment(org.jfree.ui.HorizontalAlignment alignment)
Sets the text alignment and sends a TitleChangeEvent to
all registered listeners. |
void |
setToolTipText(java.lang.String text)
Sets the tool tip text to the specified text and sends a TitleChangeEvent to all registered listeners. |
void |
setURLText(java.lang.String text)
Sets the URL text to the specified text and sends a TitleChangeEvent to all registered listeners. |
| 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 |
| Field Detail |
|---|
public static final java.awt.Font DEFAULT_FONT
public static final java.awt.Paint DEFAULT_TEXT_PAINT
| Constructor Detail |
|---|
public TextTitle()
public TextTitle(java.lang.String text)
text - the title text (null not permitted).
public TextTitle(java.lang.String text,
java.awt.Font font)
text - the title text (null not permitted).font - the title font (null not permitted).
public TextTitle(java.lang.String text,
java.awt.Font font,
java.awt.Paint paint,
org.jfree.ui.RectangleEdge position,
org.jfree.ui.HorizontalAlignment horizontalAlignment,
org.jfree.ui.VerticalAlignment verticalAlignment,
org.jfree.ui.RectangleInsets padding)
text - the text for the title (null not permitted).font - the title font (null not permitted).paint - the title paint (null not permitted).position - the title position (null not permitted).horizontalAlignment - the horizontal alignment (null
not permitted).verticalAlignment - the vertical alignment (null not
permitted).padding - the space to leave around the outside of the title.| Method Detail |
|---|
public java.lang.String getText()
null).setText(String)public void setText(java.lang.String text)
TitleChangeEvent to all registered listeners.
text - the text (null not permitted).public org.jfree.ui.HorizontalAlignment getTextAlignment()
public void setTextAlignment(org.jfree.ui.HorizontalAlignment alignment)
TitleChangeEvent to
all registered listeners.
alignment - the alignment (null not permitted).public java.awt.Font getFont()
null).setFont(Font)public void setFont(java.awt.Font font)
font - the new font (null not permitted).getFont()public java.awt.Paint getPaint()
null).setPaint(Paint)public void setPaint(java.awt.Paint paint)
paint - the new paint (null not permitted).getPaint()public java.awt.Paint getBackgroundPaint()
null).public void setBackgroundPaint(java.awt.Paint paint)
TitleChangeEvent to all
registered listeners. If you set this attribute to null,
no background is painted (which makes the title background transparent).
paint - the background paint (null permitted).public java.lang.String getToolTipText()
null).public void setToolTipText(java.lang.String text)
TitleChangeEvent to all registered listeners.
text - the text (null permitted).public java.lang.String getURLText()
null).public void setURLText(java.lang.String text)
TitleChangeEvent to all registered listeners.
text - the text (null permitted).public boolean getExpandToFitSpace()
public void setExpandToFitSpace(boolean expand)
TitleChangeEvent to all registered
listeners.
expand - the flag.public int getMaximumLinesToDisplay()
setMaximumLinesToDisplay(int)public void setMaximumLinesToDisplay(int max)
TitleChangeEvent to all registered listeners.
max - the maximum.getMaximumLinesToDisplay()
public org.jfree.ui.Size2D arrange(java.awt.Graphics2D g2,
RectangleConstraint constraint)
arrange in interface Blockarrange in class AbstractBlockg2 - the graphics device.constraint - the constraint (null not permitted).
null).protected org.jfree.ui.Size2D arrangeNN(java.awt.Graphics2D g2)
g2 - the graphics target.
protected org.jfree.ui.Size2D arrangeFN(java.awt.Graphics2D g2,
double w)
g2 - the graphics target.w - the width.
protected org.jfree.ui.Size2D arrangeRN(java.awt.Graphics2D g2,
Range widthRange)
g2 - the graphics target.widthRange - the range for the width.
protected org.jfree.ui.Size2D arrangeRR(java.awt.Graphics2D g2,
Range widthRange,
Range heightRange)
g2 - the graphics device.widthRange - the width range.heightRange - the height range.
public void draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
draw in interface org.jfree.ui.Drawabledraw in class Titleg2 - the graphics device.area - the area allocated for the title.
public java.lang.Object draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
java.lang.Object params)
draw in interface Blockg2 - the graphics device.area - the area.params - if this is an instance of EntityBlockParams it
is used to determine whether or not an
EntityCollection is returned by this method.
EntityCollection containing a chart entity for the
title, or null.
protected void drawHorizontal(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
draw
method.
g2 - the graphics device.area - the area for the title.
protected void drawVertical(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
draw
method.
g2 - the graphics device.area - the area for the title.public boolean equals(java.lang.Object obj)
equals in class Titleobj - the object (null permitted).
true or false.public int hashCode()
hashCode in class Title
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class Titlejava.lang.CloneNotSupportedException - never.
|
Footer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||