Package org.apache.pivot.wtk
Class TextArea.Paragraph
- java.lang.Object
-
- org.apache.pivot.wtk.TextArea.Paragraph
-
- Enclosing class:
- TextArea
public static final class TextArea.Paragraph extends java.lang.Object
Class representing a paragraph of text.
-
-
Constructor Summary
Constructors Constructor Description Paragraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(char character)
Append the given character to this paragraph.void
clear()
Clear all the characters in this paragraph.java.lang.CharSequence
getCharacters()
int
getOffset()
ListenerList<TextArea.ParagraphListener>
getParagraphListeners()
TextArea
getTextArea()
void
insertText(java.lang.CharSequence text, int index)
Insert the characters at the given index into this paragraph.void
removeText(int index)
Remove all the text in this paragraph starting at the index.void
removeText(int index, int count)
Remove some of the text in this paragraph.
-
-
-
Method Detail
-
getCharacters
public java.lang.CharSequence getCharacters()
- Returns:
- The characters in this paragraph.
-
getTextArea
public TextArea getTextArea()
- Returns:
- The
TextArea
this paragraph belongs to.
-
append
public void append(char character)
Append the given character to this paragraph.- Parameters:
character
- The character to append.
-
clear
public void clear()
Clear all the characters in this paragraph.
-
insertText
public void insertText(java.lang.CharSequence text, int index)
Insert the characters at the given index into this paragraph.- Parameters:
text
- The sequence of characters to insert.index
- The index into this paragraph where to insert the text.
-
removeText
public void removeText(int index)
Remove all the text in this paragraph starting at the index.- Parameters:
index
- The starting index in the paragraph where to remove the text.
-
removeText
public void removeText(int index, int count)
Remove some of the text in this paragraph.- Parameters:
index
- Index in the paragraph where to start to remove the text.count
- Number of characters to remove starting at the index.
-
getOffset
public int getOffset()
- Returns:
- The relative offset of the text in this paragraph from the beginning of the entire text.
-
getParagraphListeners
public ListenerList<TextArea.ParagraphListener> getParagraphListeners()
- Returns:
- The listeners on this paragraph.
-
-