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
-
getBaselineAt(int)
- Returns the baseline of the line at the specified index.
-
getLineBeginAt(int)
- Returns the beginning index of the line at the specified index.
-
getLineCount()
- Returns the number of the lines in this text lines.
-
getLineEndAt(int)
- Returns the ending index of the line at the specified index.
-
getLineIndexNearby(TextPositionInfo, int)
- Returns the line index nearby the specfied text position information
at the specified index of the text.
-
getLineIndexNearby(TextPositionInfo, Point)
- Returns the line index nearby the specfied text position information
at the specified location.
-
getLineSkipAt(int)
- Returns the line skip space at the specified line index.
-
getLineTopAt(int)
- Returns the top position of the line at the specified index.
-
getRemainWidthAt(int)
- Returns the remaining width of the line at the specified index.
-
getRichText()
- Returns the rich text to be composed into lines.
-
getRichTextStyle()
- Returns the rich text style of this text lines.
-
getText()
- Returns the text to be composed into lines.
-
getTextLineAt(int)
- Returns the text line information for the line at the specified
line index.
-
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.
-
getTextPositionAtLineBegin(int)
- Returns the text position information at the beginning of the line
at the specified line index.
-
isParagraphMarkAt(int)
- Checks if the line at the specified index is a paragraph end.
-
isValid()
- Checks if the text lines has a valid layout.
-
printDebugInfo()
- Prints the debbuging information to the
System.out
.
getText
public final Text getText()
- Returns the text to be composed into lines.
getRichText
public final RichText getRichText()
- Returns the rich text to be composed into lines.
getRichTextStyle
public final RichTextStyle getRichTextStyle()
- Returns the rich text style of this text lines.
getLineCount
public final int getLineCount()
- Returns the number of the lines in this text lines.
getLineBeginAt
public final int getLineBeginAt(int lineIndex)
- Returns the beginning index of the line at the specified index.
getLineEndAt
public final int getLineEndAt(int lineIndex)
- Returns the ending index of the line at the specified index.
isParagraphMarkAt
public final boolean isParagraphMarkAt(int lineIndex)
- Checks if the line at the specified index is a paragraph end.
getRemainWidthAt
public final int getRemainWidthAt(int lineIndex)
- Returns the remaining width of the line at the specified index.
getLineSkipAt
public final int getLineSkipAt(int lineIndex)
- Returns the line skip space at the specified line index.
getBaselineAt
public final int getBaselineAt(int lineIndex)
- Returns the baseline of the line at the specified index.
getLineTopAt
public final int getLineTopAt(int lineIndex)
- Returns the top position of the line at the specified index.
isValid
public boolean isValid()
- Checks if the text lines has a valid layout.
getTextLineAt
public final TextLineInfo getTextLineAt(int lineIndex)
- Returns the text line information for the line at the specified
line index.
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.
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.
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.
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.
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