public class ColoredStringList<T> extends ArrayList<IColoredString<T>>
IColoredString
s. It
does nothing smart, its only purpose is to save you some typing for frequent
calls. It is particularly useful when feeding large pieces of text to classes
like TextPanel
.modCount
Constructor and Description |
---|
ColoredStringList() |
Modifier and Type | Method and Description |
---|---|
void |
addAllText(Collection<? extends IColoredString<T>> texts)
Contrary to
Collection.addAll(Collection) , this method appends
text to the current text, without inserting new lines. |
void |
addColoredText(String text,
T c)
Appends colored text to
this . |
void |
addColoredTextOnNewLine(String text,
T color)
Appends colored text to
this . |
void |
addEmptyLine()
Jumps a line.
|
void |
addOnNewLine(Collection<? extends IColoredString<T>> texts)
Adds
texts to this , starting a new line for the first
one. |
void |
addText(IColoredString<T> text)
Appends
text to this . |
void |
addText(String text)
Appends
text to this , without specifying its color. |
void |
addTextOnNewLine(IColoredString<T> text) |
void |
addTextOnNewLine(String text)
Appends text to
this , on a new line; without specifying its
color. |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public ColoredStringList()
public void addText(String text)
text
to this
, without specifying its color.text
- public void addText(IColoredString<T> text)
text
to this
.text
- public void addColoredText(String text, T c)
this
.text
- public void addTextOnNewLine(String text)
this
, on a new line; without specifying its
color.text
- public void addTextOnNewLine(IColoredString<T> text)
public void addColoredTextOnNewLine(String text, T color)
this
.text
- public void addOnNewLine(Collection<? extends IColoredString<T>> texts)
texts
to this
, starting a new line for the first
one.texts
- public void addAllText(Collection<? extends IColoredString<T>> texts)
Collection.addAll(Collection)
, this method appends
text to the current text, without inserting new lines.texts
- public void addEmptyLine()
Copyright © 2012–2016. All rights reserved.