public interface StyledTextOutput extends Appendable
| Modifier and Type | Interface and Description |
|---|---|
static class |
StyledTextOutput.Style |
| Modifier and Type | Method and Description |
|---|---|
StyledTextOutput |
append(char c)
Appends a character using the current style.
|
StyledTextOutput |
append(CharSequence csq)
Appends a sequence of characters using the current style.
|
StyledTextOutput |
append(CharSequence csq,
int start,
int end)
Appends a sequence of characters using the current style.
|
StyledTextOutput |
exception(Throwable throwable)
Appends the stacktrace of the given exception using the current style.
|
StyledTextOutput |
format(String pattern,
Object... args)
Appends a formatted string using the current style.
|
StyledTextOutput |
formatln(String pattern,
Object... args)
Appends a formatted string using the current style and starts a new line.
|
StyledTextOutput |
println()
Starts a new line.
|
StyledTextOutput |
println(Object text)
Appends text using the current style and starts a new line.
|
StyledTextOutput |
style(StyledTextOutput.Style style)
Switches to a new style.
|
StyledTextOutput |
text(Object text)
Appends text using the current style.
|
StyledTextOutput |
withStyle(StyledTextOutput.Style style)
Creates a copy of this output which uses the given style.
|
StyledTextOutput append(char c)
append in interface Appendablec - The characterStyledTextOutput append(CharSequence csq)
append in interface Appendablecsq - The character sequenceStyledTextOutput append(CharSequence csq, int start, int end)
append in interface Appendablecsq - The character sequenceStyledTextOutput style(StyledTextOutput.Style style)
StyledTextOutput.Style.Normal.style - The style.StyledTextOutput withStyle(StyledTextOutput.Style style)
output.style(Info)
output.withStyle(Description).format("%s %s", name, description) // output in Description style
output.println(" text") // output in Info style
style - The temporary styleStyledTextOutput text(Object text)
text - The textStyledTextOutput println(Object text)
text - The textStyledTextOutput format(String pattern, Object... args)
pattern - The pattern stringargs - The args for the patternStyledTextOutput formatln(String pattern, Object... args)
pattern - The pattern stringargs - The args for the patternStyledTextOutput println()
StyledTextOutput exception(Throwable throwable)
throwable - The exceptionCopyright © 2013. All rights reserved