Save This Page
Home » jcommon-1.0.13 » org.jfree.text » [javadoc | source]
org.jfree.text
public class: TextBlock [javadoc | source]
java.lang.Object
   org.jfree.text.TextBlock

All Implemented Interfaces:
    Serializable

A list of TextLine objects that form a block of text.
Constructor:
 public TextBlock() 
Method from org.jfree.text.TextBlock Summary:
addLine,   addLine,   calculateBounds,   calculateDimensions,   draw,   draw,   equals,   getLastLine,   getLineAlignment,   getLines,   hashCode,   setLineAlignment
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.text.TextBlock Detail:
 public  void addLine(TextLine line) 
 public  void addLine(String text,
    Font font,
    Paint paint) 
    Adds a line of text that will be displayed using the specified font.
 public Shape calculateBounds(Graphics2D g2,
    float anchorX,
    float anchorY,
    TextBlockAnchor anchor,
    float rotateX,
    float rotateY,
    double angle) 
    Returns the bounds of the text block.
 public Size2D calculateDimensions(Graphics2D g2) 
    Returns the width and height of the text block.
 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.
 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.