public class TextTitle extends Title implements Serializable, Cloneable, org.jfree.util.PublicCloneable
Modifier and Type | Field and Description |
---|---|
static Font |
DEFAULT_FONT
The default font.
|
static Paint |
DEFAULT_TEXT_PAINT
The default text color.
|
DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_PADDING, DEFAULT_POSITION, DEFAULT_VERTICAL_ALIGNMENT, visible
Constructor and Description |
---|
TextTitle()
Creates a new title, using default attributes where necessary.
|
TextTitle(String text)
Creates a new title, using default attributes where necessary.
|
TextTitle(String text,
Font font)
Creates a new title, using default attributes where necessary.
|
TextTitle(String text,
Font font,
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.
|
Modifier and Type | Method and Description |
---|---|
org.jfree.ui.Size2D |
arrange(Graphics2D g2,
RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and
returns the block size.
|
Object |
clone()
Returns a clone of this object.
|
void |
draw(Graphics2D g2,
Rectangle2D area)
Draws the title on a Java 2D graphics device (such as the screen or a
printer).
|
Object |
draw(Graphics2D g2,
Rectangle2D area,
Object params)
Draws the block within the specified area.
|
boolean |
equals(Object obj)
Tests this title for equality with another object.
|
Paint |
getBackgroundPaint()
Returns the background paint.
|
boolean |
getExpandToFitSpace()
Returns the flag that controls whether or not the title expands to fit
the available space.
|
Font |
getFont()
Returns the font used to display the title string.
|
int |
getMaximumLinesToDisplay()
Returns the maximum number of lines to display.
|
Paint |
getPaint()
Returns the paint used to display the title string.
|
String |
getText()
Returns the title text.
|
org.jfree.ui.HorizontalAlignment |
getTextAlignment()
Returns the text alignment.
|
String |
getToolTipText()
Returns the tool tip text.
|
String |
getURLText()
Returns the URL text.
|
int |
hashCode()
Returns a hash code.
|
void |
setBackgroundPaint(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(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(Paint paint)
Sets the paint used to display the title string.
|
void |
setText(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(String text)
Sets the tool tip text to the specified text and sends a
TitleChangeEvent to all registered listeners. |
void |
setURLText(String text)
Sets the URL text to the specified text and sends a
TitleChangeEvent to all registered listeners. |
addChangeListener, getHorizontalAlignment, getNotify, getPosition, getVerticalAlignment, isVisible, removeChangeListener, setHorizontalAlignment, setNotify, setPosition, setVerticalAlignment, setVisible
arrange, getBorder, getBounds, getContentXOffset, getContentYOffset, getFrame, getHeight, getID, getMargin, getPadding, getWidth, setBorder, setBorder, setBounds, setFrame, setHeight, setID, setMargin, setMargin, setPadding, setPadding, setWidth
public static final Font DEFAULT_FONT
public static final Paint DEFAULT_TEXT_PAINT
public TextTitle()
public TextTitle(String text)
text
- the title text (null
not permitted).public TextTitle(String text, Font font)
text
- the title text (null
not permitted).font
- the title font (null
not permitted).public TextTitle(String text, Font font, 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.public String getText()
null
).setText(String)
public void setText(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 Font getFont()
null
).setFont(Font)
public void setFont(Font font)
font
- the new font (null
not permitted).getFont()
public Paint getPaint()
null
).setPaint(Paint)
public void setPaint(Paint paint)
paint
- the new paint (null
not permitted).getPaint()
public Paint getBackgroundPaint()
null
).public void setBackgroundPaint(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 String getToolTipText()
null
).public void setToolTipText(String text)
TitleChangeEvent
to all registered listeners.text
- the text (null
permitted).public String getURLText()
null
).public void setURLText(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(Graphics2D g2, RectangleConstraint constraint)
arrange
in interface Block
arrange
in class AbstractBlock
g2
- the graphics device.constraint
- the constraint (null
not permitted).null
).public void draw(Graphics2D g2, Rectangle2D area)
public Object draw(Graphics2D g2, Rectangle2D area, Object params)
draw
in interface Block
g2
- 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
.public boolean equals(Object obj)
public int hashCode()
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Title
CloneNotSupportedException
- never.Jas4pp 1.5 © Java Analysis Studio for Particle Physics