public interface StyledTextContent
Modifier and Type | Interface and Description |
---|---|
static interface |
StyledTextContent.TextChangeListener
Listener informed above modifications
|
Modifier and Type | Method and Description |
---|---|
void |
addTextChangeListener(StyledTextContent.TextChangeListener listener)
Attach a change listener
|
int |
getCharCount() |
@NonNull java.lang.String |
getLine(int index)
Get the content of the line with the given index
|
int |
getLineAtOffset(int charPosition)
Get the line index for the char
|
int |
getLineCount() |
int |
getOffsetAtLine(int lineIndex)
Get the offset of the line
|
@NonNull java.lang.String |
getTextRange(int start,
int length)
Get the content for the given range
|
void |
removeTextChangeListener(StyledTextContent.TextChangeListener listener)
Remove a change listener
|
void |
replaceTextRange(int start,
int replaceLength,
@NonNull java.lang.String newText)
Replace the content in range
|
void |
setText(@NonNull java.lang.String text)
Set a new text content
|
@NonNull java.lang.String getLine(int index)
index
- the index@NonNull java.lang.String getTextRange(int start, int length)
start
- the startlength
- the lengthvoid setText(@NonNull java.lang.String text)
text
- the textint getCharCount()
int getLineCount()
int getOffsetAtLine(int lineIndex)
lineIndex
- the line indexint getLineAtOffset(int charPosition)
charPosition
- the char positionvoid replaceTextRange(int start, int replaceLength, @NonNull java.lang.String newText)
start
- the startreplaceLength
- the replaced lengthnewText
- the new textvoid addTextChangeListener(StyledTextContent.TextChangeListener listener)
listener
- the listenervoid removeTextChangeListener(StyledTextContent.TextChangeListener listener)
listener
- the listener