|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.text.TextLine
A sequence of TextFragment
objects that together form a line of text. A sequence
of text lines is managed by the TextBlock
class.
Constructor Summary | |
TextLine()
Creates a new empty line. |
|
TextLine(java.lang.String text)
Creates a new text line using the default font. |
|
TextLine(java.lang.String text,
java.awt.Font font)
Creates a new text line. |
Method Summary | |
void |
addFragment(TextFragment fragment)
Adds a text fragment to the text line. |
java.awt.Dimension |
calculateDimensions(java.awt.Graphics2D g2)
Calculates the width and height of the text line. |
void |
draw(java.awt.Graphics2D g2,
float anchorX,
float anchorY,
TextAnchor anchor,
float rotateX,
float rotateY,
double angle)
Draws the text line. |
TextFragment |
getFirstTextFragment()
Returns the first text fragment in the line. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextLine()
public TextLine(java.lang.String text)
text
- the text.public TextLine(java.lang.String text, java.awt.Font font)
text
- the text.font
- the text font.Method Detail |
public void addFragment(TextFragment fragment)
fragment
- the text fragment.public java.awt.Dimension calculateDimensions(java.awt.Graphics2D g2)
g2
- the graphics device.
public void draw(java.awt.Graphics2D g2, float anchorX, float anchorY, TextAnchor anchor, float rotateX, float rotateY, double angle)
g2
- the graphics device.anchorX
- the x-coordinate for the anchor point.anchorY
- the y-coordinate for the anchor point.anchor
- the point on the text line that is aligned to the anchor point.rotateX
- the x-coordinate for the rotation point.rotateY
- the y-coordinate for the rotation point.angle
- the rotation angle (in radians).public TextFragment getFirstTextFragment()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |