public class FormattedTextFragmentCollection extends RemoveOnlyListBase<FormattedTextFragment>
This collection contains the items of base type.FormattedTextFragment
| Constructor and Description |
|---|
FormattedTextFragmentCollection(int collectionType) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String text)
Adds a formatted text fragment to the collection.
|
void |
add(String text,
Font font)
Adds a formatted text fragment to the collection.
|
void |
add(String text,
Font font,
Color foregroundColor)
Adds a formatted text fragment to the collection.
|
void |
add(String text,
Font font,
Color foregroundColor,
Color backgroundColor)
Adds a formatted text fragment to the collection.
|
FormattedTextFragment |
createInDocument(int index,
String text,
Font font,
Color foregroundColor,
Color backgroundColor) |
int |
getCollectionType()
Gets the formatted fragment collection type.
|
Color |
getDefaultBackgroundColor() |
Font |
getDefaultFont() |
Color |
getDefaultForegroundColor() |
String |
getText() |
void |
insert(int index,
String text)
Inserts a formatted text fragment into the collection at a given index.
|
void |
insert(int index,
String text,
Font font)
Inserts a formatted text fragment into the collection at a given index.
|
void |
insert(int index,
String text,
Font font,
Color foregroundColor)
Inserts a formatted text fragment into the collection at a given index.
|
void |
insert(int index,
String text,
Font font,
Color foregroundColor,
Color backgroundColor)
Inserts a formatted text fragment into the collection at a given index.
|
void |
setText(String text) |
clear, isReadOnly, remove, removeAt, removeFromDocumentaddInternally, contains, get_Item, getCount, getInnerList, indexOf, iteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic FormattedTextFragmentCollection(int collectionType)
public final void add(String text)
Adds a formatted text fragment to the collection.
text - The fragment text.public final void add(String text, Font font)
Adds a formatted text fragment to the collection.
text - The fragment text.font - The font of the text.public final void add(String text, Font font, Color foregroundColor)
Adds a formatted text fragment to the collection.
text - The fragment text.font - The font of the text.foregroundColor - The foreground color of the text.public final void add(String text, Font font, Color foregroundColor, Color backgroundColor)
Adds a formatted text fragment to the collection.
text - The fragment text.font - The font of the text.foregroundColor - The foreground color of the text.backgroundColor - The background color of the text.public FormattedTextFragment createInDocument(int index, String text, Font font, Color foregroundColor, Color backgroundColor)
public final int getCollectionType()
Gets the formatted fragment collection type.
public final Color getDefaultBackgroundColor()
public final Font getDefaultFont()
public final Color getDefaultForegroundColor()
public String getText()
public final void insert(int index,
String text)
Inserts a formatted text fragment into the collection at a given index.
index - The zero-based index at which formatted text fragment should be inserted.text - The fragment text.public final void insert(int index,
String text,
Font font)
Inserts a formatted text fragment into the collection at a given index.
index - The zero-based index at which formatted text fragment should be inserted.text - The fragment text.font - The font of the text.public final void insert(int index,
String text,
Font font,
Color foregroundColor)
Inserts a formatted text fragment into the collection at a given index.
index - The zero-based index at which formatted text fragment should be inserted.text - The fragment text.font - The font of the text.foregroundColor - The foreground color of the text.public final void insert(int index,
String text,
Font font,
Color foregroundColor,
Color backgroundColor)
Inserts a formatted text fragment into the collection at a given index.
index - The zero-based index at which formatted text fragment should be inserted.text - The fragment text.font - The font of the text.foregroundColor - The foreground color of the text.backgroundColor - The background color of the text.public void setText(String text)
Copyright © 2026. All rights reserved.