All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.graphics.TextLines

java.lang.Object
   |
   +----jp.kyasu.graphics.TextLines

public class TextLines
extends Object
implements Serializable
The TextLines class implements an information of the lines into which the rich text is composed. This class is a super class of the TextLayout class. An instance of this class can not be created outside this package.

Version:
20 Nov 1999
Author:
Kazuki YASUMATSU
See Also:
TextLayout

Method Index

 o getBaselineAt(int)
Returns the baseline of the line at the specified index.
 o getLineBeginAt(int)
Returns the beginning index of the line at the specified index.
 o getLineCount()
Returns the number of the lines in this text lines.
 o getLineEndAt(int)
Returns the ending index of the line at the specified index.
 o getLineIndexNearby(TextPositionInfo, int)
Returns the line index nearby the specfied text position information at the specified index of the text.
 o getLineIndexNearby(TextPositionInfo, Point)
Returns the line index nearby the specfied text position information at the specified location.
 o getLineSkipAt(int)
Returns the line skip space at the specified line index.
 o getLineTopAt(int)
Returns the top position of the line at the specified index.
 o getRemainWidthAt(int)
Returns the remaining width of the line at the specified index.
 o getRichText()
Returns the rich text to be composed into lines.
 o getRichTextStyle()
Returns the rich text style of this text lines.
 o getText()
Returns the text to be composed into lines.
 o getTextLineAt(int)
Returns the text line information for the line at the specified line index.
 o getTextLineInto(int, TextLineInfo)
Sets the text line information for the line at the specified line index into the specified text line information object, and returns the text line information object set.
 o getTextPositionAtLineBegin(int)
Returns the text position information at the beginning of the line at the specified line index.
 o isParagraphMarkAt(int)
Checks if the line at the specified index is a paragraph end.
 o isValid()
Checks if the text lines has a valid layout.
 o printDebugInfo()
Prints the debbuging information to the System.out.

Methods

 o getText
 public final Text getText()
Returns the text to be composed into lines.

 o getRichText
 public final RichText getRichText()
Returns the rich text to be composed into lines.

 o getRichTextStyle
 public final RichTextStyle getRichTextStyle()
Returns the rich text style of this text lines.

 o getLineCount
 public final int getLineCount()
Returns the number of the lines in this text lines.

 o getLineBeginAt
 public final int getLineBeginAt(int lineIndex)
Returns the beginning index of the line at the specified index.

 o getLineEndAt
 public final int getLineEndAt(int lineIndex)
Returns the ending index of the line at the specified index.

 o isParagraphMarkAt
 public final boolean isParagraphMarkAt(int lineIndex)
Checks if the line at the specified index is a paragraph end.

 o getRemainWidthAt
 public final int getRemainWidthAt(int lineIndex)
Returns the remaining width of the line at the specified index.

 o getLineSkipAt
 public final int getLineSkipAt(int lineIndex)
Returns the line skip space at the specified line index.

 o getBaselineAt
 public final int getBaselineAt(int lineIndex)
Returns the baseline of the line at the specified index.

 o getLineTopAt
 public final int getLineTopAt(int lineIndex)
Returns the top position of the line at the specified index.

 o isValid
 public boolean isValid()
Checks if the text lines has a valid layout.

 o getTextLineAt
 public final TextLineInfo getTextLineAt(int lineIndex)
Returns the text line information for the line at the specified line index.

 o getTextLineInto
 public final TextLineInfo getTextLineInto(int lineIndex,
                                           TextLineInfo lineInfo)
Sets the text line information for the line at the specified line index into the specified text line information object, and returns the text line information object set.

 o getTextPositionAtLineBegin
 public final TextPositionInfo getTextPositionAtLineBegin(int lineIndex)
Returns the text position information at the beginning of the line at the specified line index.

Parameters:
lineIndex - the line index.
Returns:
the text position information.
 o getLineIndexNearby
 public final int getLineIndexNearby(TextPositionInfo posInfo,
                                     int textIndex)
Returns the line index nearby the specfied text position information at the specified index of the text.

Parameters:
posInfo - the text position information used as the starting point for searching. If null, the searching starts from the beginning or ending of the layout according to the index of the text.
textIndex - the index of the text to search for.
Returns:
the line index; or -1 if this text lines does not have a valid layout.
 o getLineIndexNearby
 public final int getLineIndexNearby(TextPositionInfo posInfo,
                                     Point point)
Returns the line index nearby the specfied text position information at the specified location.

Parameters:
posInfo - the text position information used as the starting point for searching. If null, the searching starts from the top or bottom of the layout according to the location.
point - the location to search for.
Returns:
the line index; or -1 if this text lines does not have a valid layout.
 o printDebugInfo
 public void printDebugInfo()
Prints the debbuging information to the System.out. This method is used for DEBUG.


All Packages  Class Hierarchy  This Package  Previous  Next  Index