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

All Implemented Interfaces:
    Serializable

A sequence of TextFragment objects that together form a line of text. A sequence of text lines is managed by the TextBlock class.
Constructor:
 public TextLine() 
 public TextLine(String text) 
    Creates a new text line using the default font.
    Parameters:
    text - the text (null not permitted).
 public TextLine(String text,
    Font font) 
    Creates a new text line.
    Parameters:
    text - the text (null not permitted).
    font - the text font (null not permitted).
 public TextLine(String text,
    Font font,
    Paint paint) 
    Creates a new text line.
    Parameters:
    text - the text (null not permitted).
    font - the text font (null not permitted).
    paint - the text color (null not permitted).
Method from org.jfree.text.TextLine Summary:
addFragment,   calculateDimensions,   draw,   equals,   getFirstTextFragment,   getLastTextFragment,   hashCode,   removeFragment
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.text.TextLine Detail:
 public  void addFragment(TextFragment fragment) 
    Adds a text fragment to the text line.
 public Size2D calculateDimensions(Graphics2D g2) 
    Calculates the width and height of the text line.
 public  void draw(Graphics2D g2,
    float anchorX,
    float anchorY,
    TextAnchor anchor,
    float rotateX,
    float rotateY,
    double angle) 
    Draws the text line.
 public boolean equals(Object obj) 
    Tests this object for equality with an arbitrary object.
 public TextFragment getFirstTextFragment() 
    Returns the first text fragment in the line.
 public TextFragment getLastTextFragment() 
    Returns the last text fragment in the line.
 public int hashCode() 
    Returns a hash code for this object.
 public  void removeFragment(TextFragment fragment) 
    Removes a fragment from the line.