| java.lang.Object org.jfree.text.TextBlock
Field Summary | |
final protected static LogContext | logger Access to logging facilities. |
Constructor Summary | |
public | TextBlock() Creates a new empty text block. |
Method Summary | |
public void | addLine(String text, Font font, Paint paint) Adds a line of text that will be displayed using the specified font. | public void | addLine(TextLine line) Adds a
TextLine to the block. | public Shape | calculateBounds(Graphics2D g2, float anchorX, float anchorY, TextBlockAnchor anchor, float rotateX, float rotateY, double angle) Returns the bounds of the text block.
Parameters: g2 - the graphics device (null not permitted). Parameters: anchorX - the x-coordinate for the anchor point. Parameters: anchorY - the y-coordinate for the anchor point. Parameters: anchor - the text block anchor (null not permitted). Parameters: rotateX - the x-coordinate for the rotation point. Parameters: rotateY - the y-coordinate for the rotation point. Parameters: angle - the rotation angle. | public Size2D | calculateDimensions(Graphics2D g2) Returns the width and height of the text block.
Parameters: g2 - the graphics device. | public void | draw(Graphics2D g2, float x, float y, TextBlockAnchor anchor) Draws the text block at a specific location. | public void | draw(Graphics2D g2, float anchorX, float anchorY, TextBlockAnchor anchor, float rotateX, float rotateY, double angle) Draws the text block, aligning it with the specified anchor point and
rotating it about the specified rotation point. | public boolean | equals(Object obj) Tests this object for equality with an arbitrary object.
Parameters: obj - the object to test against (null permitted). | public TextLine | getLastLine() Returns the last line in the block. | public HorizontalAlignment | getLineAlignment() Returns the alignment of the lines of text within the block. | public List | getLines() Returns an unmodifiable list containing the lines for the text block. | public int | hashCode() Returns a hash code for this object. | public void | setLineAlignment(HorizontalAlignment alignment) Sets the alignment of the lines of text within the block. |
logger | final protected static LogContext logger(Code) | | Access to logging facilities.
|
TextBlock | public TextBlock()(Code) | | Creates a new empty text block.
|
addLine | public void addLine(String text, Font font, Paint paint)(Code) | | Adds a line of text that will be displayed using the specified font.
Parameters: text - the text. Parameters: font - the font. Parameters: paint - the paint. |
calculateBounds | public Shape calculateBounds(Graphics2D g2, float anchorX, float anchorY, TextBlockAnchor anchor, float rotateX, float rotateY, double angle)(Code) | | Returns the bounds of the text block.
Parameters: g2 - the graphics device (null not permitted). Parameters: anchorX - the x-coordinate for the anchor point. Parameters: anchorY - the y-coordinate for the anchor point. Parameters: anchor - the text block anchor (null not permitted). Parameters: rotateX - the x-coordinate for the rotation point. Parameters: rotateY - the y-coordinate for the rotation point. Parameters: angle - the rotation angle. The bounds. |
calculateDimensions | public Size2D calculateDimensions(Graphics2D g2)(Code) | | Returns the width and height of the text block.
Parameters: g2 - the graphics device. The width and height. |
draw | public void draw(Graphics2D g2, float x, float y, TextBlockAnchor anchor)(Code) | | Draws the text block at a specific location.
Parameters: g2 - the graphics device. Parameters: x - the x-coordinate for the anchor point. Parameters: y - the y-coordinate for the anchor point. Parameters: anchor - the anchor point. |
draw | public void draw(Graphics2D g2, float anchorX, float anchorY, TextBlockAnchor anchor, float rotateX, float rotateY, double angle)(Code) | | Draws the text block, aligning it with the specified anchor point and
rotating it about the specified rotation point.
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 block that is aligned to the anchor point. Parameters: rotateX - the x-coordinate for the rotation point. Parameters: rotateY - the x-coordinate for the rotation point. Parameters: angle - the rotation (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. |
getLastLine | public TextLine getLastLine()(Code) | | Returns the last line in the block.
The last line in the block. |
getLineAlignment | public HorizontalAlignment getLineAlignment()(Code) | | Returns the alignment of the lines of text within the block.
The alignment (never null ). |
getLines | public List getLines()(Code) | | Returns an unmodifiable list containing the lines for the text block.
A list of TextLine objects. |
hashCode | public int hashCode()(Code) | | Returns a hash code for this object.
A hash code. |
setLineAlignment | public void setLineAlignment(HorizontalAlignment alignment)(Code) | | Sets the alignment of the lines of text within the block.
Parameters: alignment - the alignment (null not permitted). |
|
|