| java.lang.Object org.jfree.text.TextLine
TextLine | public class TextLine implements Serializable(Code) | | A sequence of
TextFragment objects that together form a line of
text. A sequence of text lines is managed by the
TextBlock class.
author: David Gilbert |
Field Summary | |
final protected static LogContext | logger Access to logging facilities. |
logger | final protected static LogContext logger(Code) | | Access to logging facilities.
|
TextLine | public TextLine()(Code) | | Creates a new empty line.
|
TextLine | public TextLine(String text)(Code) | | Creates a new text line using the default font.
Parameters: text - the text (null not permitted). |
TextLine | public TextLine(String text, Font font)(Code) | | Creates a new text line.
Parameters: text - the text (null not permitted). Parameters: font - the text font (null not permitted). |
TextLine | public TextLine(String text, Font font, Paint paint)(Code) | | Creates a new text line.
Parameters: text - the text (null not permitted). Parameters: font - the text font (null not permitted). Parameters: paint - the text color (null not permitted). |
addFragment | public void addFragment(TextFragment fragment)(Code) | | Adds a text fragment to the text line.
Parameters: fragment - the text fragment (null not permitted). |
calculateDimensions | public Size2D calculateDimensions(Graphics2D g2)(Code) | | Calculates the width and height of the text line.
Parameters: g2 - the graphics device. The width and height. |
draw | public void draw(Graphics2D g2, float anchorX, float anchorY, TextAnchor anchor, float rotateX, float rotateY, double angle)(Code) | | Draws the text line.
Parameters: g2 - the graphics device. Parameters: anchorX - the x-coordinate for the anchor point. Parameters: anchorY - the y-coordinate for the anchor point. Parameters: anchor - the point on the text line that is aligned to the anchor point. Parameters: rotateX - the x-coordinate for the rotation point. Parameters: rotateY - the y-coordinate for the rotation point. Parameters: angle - the rotation angle (in radians). |
equals | public boolean equals(Object obj)(Code) | | Tests this object for equality with an arbitrary object.
Parameters: obj - the object to test against (null permitted). A boolean. |
getFirstTextFragment | public TextFragment getFirstTextFragment()(Code) | | Returns the first text fragment in the line.
The first text fragment in the line. |
getLastTextFragment | public TextFragment getLastTextFragment()(Code) | | Returns the last text fragment in the line.
The last text fragment in the line. |
hashCode | public int hashCode()(Code) | | Returns a hash code for this object.
A hash code. |
removeFragment | public void removeFragment(TextFragment fragment)(Code) | | Removes a fragment from the line.
Parameters: fragment - the fragment to remove. |
|
|