ReportCat 1.1

li.netcat.print.util.text
Interface TextBlock


public interface TextBlock

Representation of a text block that has a width, a height and a number of lines.

Author:
Arthur Marxer

Method Summary
 int getBaseLineAt(int lineIndex)
          Returns the coordinate of the base line of the given text.
 java.awt.Font getFont()
          Returns the font that is used to paint this block.
 int getHeight()
          Returns the effective height of the text box.
 int getLength(int lineIndex)
          Returns the number of characters of a line.
 int getNrOfLines()
          Returns the number of lines.
 int getOffset(int lineIndex)
          Returns the index of the first character of a line.
 char[] getText()
          Returns a reference to the text characters.
 int getWidth()
          Returns the effective width of the text box.
 

Method Detail

getText

public char[] getText()
Returns a reference to the text characters. This array might also contain characters that are not part of the text block.

Returns:
A reference to the text characters. Callers are not allowed to modify the text.

getNrOfLines

public int getNrOfLines()
Returns the number of lines.

Returns:
The number of lines.

getOffset

public int getOffset(int lineIndex)
Returns the index of the first character of a line.

Parameters:
lineIndex - The line index, 0 >= lineIndex > getNrOfLines()
Returns:
The start position of the line, a valid index into getText().

getLength

public int getLength(int lineIndex)
Returns the number of characters of a line.

Returns:
The number of characters of a line.

getWidth

public int getWidth()
Returns the effective width of the text box.

Returns:
The effective width of the text box.

getHeight

public int getHeight()
Returns the effective height of the text box.

Returns:
The effective height of the text box.

getFont

public java.awt.Font getFont()
Returns the font that is used to paint this block.

Returns:
The font that is used to paint this block.

getBaseLineAt

public int getBaseLineAt(int lineIndex)
Returns the coordinate of the base line of the given text.

Parameters:
lineIndex - The index of the line. 0 referres to the first line.
Returns:
The distance between the upper edge of the block and the base line.

ReportCat 1.1

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation