| org.jfree.chart.title.Title org.jfree.chart.title.TextTitle
All known Subclasses: org.jfree.chart.title.DateTitle,
TextTitle | public class TextTitle extends Title implements Serializable,Cloneable,PublicCloneable(Code) | | A chart title that displays a text string with automatic wrapping as
required.
|
Constructor Summary | |
public | TextTitle() Creates a new title, using default attributes where necessary. | public | TextTitle(String text) Creates a new title, using default attributes where necessary. | public | TextTitle(String text, Font font) Creates a new title, using default attributes where necessary. | public | TextTitle(String text, Font font, Paint paint, RectangleEdge position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, RectangleInsets padding) Creates a new title. |
Method Summary | |
public Size2D | arrange(Graphics2D g2, RectangleConstraint constraint) Arranges the contents of the block, within the given constraints, and
returns the block size.
Parameters: g2 - the graphics device. Parameters: constraint - the constraint (null not permitted). | protected Size2D | arrangeRR(Graphics2D g2, Range widthRange, Range heightRange) Returns the content size for the title. | public Object | clone() Returns a clone of this object. | public void | draw(Graphics2D g2, Rectangle2D area) Draws the title on a Java 2D graphics device (such as the screen or a
printer). | public Object | draw(Graphics2D g2, Rectangle2D area, Object params) Draws the block within the specified area.
Parameters: g2 - the graphics device. Parameters: area - the area. Parameters: params - if this is an instance of EntityBlockParams itis used to determine whether or not an EntityCollection is returned by this method. | protected void | drawHorizontal(Graphics2D g2, Rectangle2D area) Draws a the title horizontally within the specified area. | protected void | drawVertical(Graphics2D g2, Rectangle2D area) Draws a the title vertically within the specified area. | public boolean | equals(Object obj) Tests this title for equality with another object.
Parameters: obj - the object (null permitted). | public Paint | getBackgroundPaint() Returns the background paint. | public boolean | getExpandToFitSpace() Returns the flag that controls whether or not the title expands to fit
the available space. | public Font | getFont() Returns the font used to display the title string. | public Paint | getPaint() Returns the paint used to display the title string. | public String | getText() Returns the title text. | public HorizontalAlignment | getTextAlignment() Returns the text alignment. | public String | getToolTipText() Returns the tool tip text. | public String | getURLText() Returns the URL text. | public int | hashCode() Returns a hash code. | public void | setBackgroundPaint(Paint paint) Sets the background paint and sends a
TitleChangeEvent to all
registered listeners. | public 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. | public void | setFont(Font font) Sets the font used to display the title string. | public void | setPaint(Paint paint) Sets the paint used to display the title string. | public void | setText(String text) Sets the title to the specified text and sends a
TitleChangeEvent to all registered listeners. | public void | setTextAlignment(HorizontalAlignment alignment) Sets the text alignment. | public void | setToolTipText(String text) Sets the tool tip text to the specified text and sends a
TitleChangeEvent to all registered listeners. | public void | setURLText(String text) Sets the URL text to the specified text and sends a
TitleChangeEvent to all registered listeners. |
DEFAULT_FONT | final public static Font DEFAULT_FONT(Code) | | The default font.
|
DEFAULT_TEXT_PAINT | final public static Paint DEFAULT_TEXT_PAINT(Code) | | The default text color.
|
TextTitle | public TextTitle()(Code) | | Creates a new title, using default attributes where necessary.
|
TextTitle | public TextTitle(String text)(Code) | | Creates a new title, using default attributes where necessary.
Parameters: text - the title text (null not permitted). |
TextTitle | public TextTitle(String text, Font font)(Code) | | Creates a new title, using default attributes where necessary.
Parameters: text - the title text (null not permitted). Parameters: font - the title font (null not permitted). |
TextTitle | public TextTitle(String text, Font font, Paint paint, RectangleEdge position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, RectangleInsets padding)(Code) | | Creates a new title.
Parameters: text - the text for the title (null not permitted). Parameters: font - the title font (null not permitted). Parameters: paint - the title paint (null not permitted). Parameters: position - the title position (null not permitted). Parameters: horizontalAlignment - the horizontal alignment (null not permitted). Parameters: verticalAlignment - the vertical alignment (null not permitted). Parameters: padding - the space to leave around the outside of the title. |
arrange | public Size2D arrange(Graphics2D g2, RectangleConstraint constraint)(Code) | | Arranges the contents of the block, within the given constraints, and
returns the block size.
Parameters: g2 - the graphics device. Parameters: constraint - the constraint (null not permitted). The block size (in Java2D units, never null ). |
arrangeRR | protected Size2D arrangeRR(Graphics2D g2, Range widthRange, Range heightRange)(Code) | | Returns the content size for the title. This will reflect the fact that
a text title positioned on the left or right of a chart will be rotated
90 degrees.
Parameters: g2 - the graphics device. Parameters: widthRange - the width range. Parameters: heightRange - the height range. The content size. |
draw | public void draw(Graphics2D g2, Rectangle2D area)(Code) | | Draws the title on a Java 2D graphics device (such as the screen or a
printer).
Parameters: g2 - the graphics device. Parameters: area - the area allocated for the title. |
equals | public boolean equals(Object obj)(Code) | | Tests this title for equality with another object.
Parameters: obj - the object (null permitted). true or false . |
getBackgroundPaint | public Paint getBackgroundPaint()(Code) | | Returns the background paint.
The paint (possibly null ). |
getExpandToFitSpace | public boolean getExpandToFitSpace()(Code) | | Returns the flag that controls whether or not the title expands to fit
the available space.
The flag. |
getTextAlignment | public HorizontalAlignment getTextAlignment()(Code) | | Returns the text alignment. This controls how the text is aligned
within the title's bounds, whereas the title's horizontal alignment
controls how the title's bounding rectangle is aligned within the
drawing space.
The text alignment. |
getToolTipText | public String getToolTipText()(Code) | | Returns the tool tip text.
The tool tip text (possibly null ). |
getURLText | public String getURLText()(Code) | | Returns the URL text.
The URL text (possibly null ). |
hashCode | public int hashCode()(Code) | | Returns a hash code.
A hash code. |
setBackgroundPaint | public void setBackgroundPaint(Paint paint)(Code) | | Sets the background paint and sends a
TitleChangeEvent to all
registered listeners. If you set this attribute to null ,
no background is painted (which makes the title background transparent).
Parameters: paint - the background paint (null permitted). |
setExpandToFitSpace | public void setExpandToFitSpace(boolean expand)(Code) | | Sets the flag that controls whether the title expands to fit the
available space, and sends a
TitleChangeEvent to all registered
listeners.
Parameters: expand - the flag. |
setFont | public void setFont(Font font)(Code) | | Sets the font used to display the title string. Registered listeners
are notified that the title has been modified.
Parameters: font - the new font (null not permitted). See Also: TextTitle.getFont() |
setPaint | public void setPaint(Paint paint)(Code) | | Sets the paint used to display the title string. Registered listeners
are notified that the title has been modified.
Parameters: paint - the new paint (null not permitted). See Also: TextTitle.getPaint() |
setText | public void setText(String text)(Code) | | Sets the title to the specified text and sends a
TitleChangeEvent to all registered listeners.
Parameters: text - the text (null not permitted). |
setTextAlignment | public void setTextAlignment(HorizontalAlignment alignment)(Code) | | Sets the text alignment.
Parameters: alignment - the alignment (null not permitted). |
setToolTipText | public void setToolTipText(String text)(Code) | | Sets the tool tip text to the specified text and sends a
TitleChangeEvent to all registered listeners.
Parameters: text - the text (null permitted). |
setURLText | public void setURLText(String text)(Code) | | Sets the URL text to the specified text and sends a
TitleChangeEvent to all registered listeners.
Parameters: text - the text (null permitted). |
Fields inherited from org.jfree.chart.title.Title | final public static HorizontalAlignment DEFAULT_HORIZONTAL_ALIGNMENT(Code)(Java Doc) final public static RectangleInsets DEFAULT_PADDING(Code)(Java Doc) final public static RectangleEdge DEFAULT_POSITION(Code)(Java Doc) final public static VerticalAlignment DEFAULT_VERTICAL_ALIGNMENT(Code)(Java Doc)
|
|
|