T - Color typepublic class ColorizedWriter<T> extends AnsiWriter
| Modifier and Type | Field and Description |
|---|---|
protected WriterControlTracker<T> |
backgroundControl |
protected WriterControlTracker<BasicDecoration> |
bold |
protected WriterControlTracker<T> |
foregroundControl |
protected WriterControlTracker<BasicDecoration> |
italic |
protected WriterControlTracker<BasicDecoration> |
strikeThrough |
protected WriterControlTracker<BasicDecoration> |
underline |
out| Constructor and Description |
|---|
ColorizedWriter(Writer writer,
ControlCodeSource<T> foregroundColorSource,
ControlCodeSource<T> backgroundColorSource) |
| Modifier and Type | Method and Description |
|---|---|
ColorizedWriter<T> |
resetBackgroundColor() |
ColorizedWriter<T> |
resetForegroundColor() |
ColorizedWriter<T> |
setBackgroundColor(T color) |
ColorizedWriter<T> |
setBold(boolean enabled) |
protected ColorizedWriter<T> |
setDecoration(boolean enabled,
BasicDecoration decoration,
WriterControlTracker<BasicDecoration> control) |
ColorizedWriter<T> |
setForegroundColor(T color) |
ColorizedWriter<T> |
setItalic(boolean enabled) |
ColorizedWriter<T> |
setStrikeThrough(boolean enabled) |
ColorizedWriter<T> |
setUnderline(boolean enabled) |
applyAll, close, registerControl, registerControls, resetAll, write, write, writeflushprotected WriterControlTracker<T> foregroundControl
protected WriterControlTracker<T> backgroundControl
protected WriterControlTracker<BasicDecoration> bold
protected WriterControlTracker<BasicDecoration> italic
protected WriterControlTracker<BasicDecoration> underline
protected WriterControlTracker<BasicDecoration> strikeThrough
public ColorizedWriter(Writer writer, ControlCodeSource<T> foregroundColorSource, ControlCodeSource<T> backgroundColorSource)
public ColorizedWriter<T> setForegroundColor(T color)
public ColorizedWriter<T> resetForegroundColor() throws IOException
IOExceptionpublic ColorizedWriter<T> setBackgroundColor(T color)
public ColorizedWriter<T> resetBackgroundColor() throws IOException
IOExceptionpublic ColorizedWriter<T> setBold(boolean enabled) throws IOException
IOExceptionpublic ColorizedWriter<T> setItalic(boolean enabled) throws IOException
IOExceptionpublic ColorizedWriter<T> setUnderline(boolean enabled) throws IOException
IOExceptionpublic ColorizedWriter<T> setStrikeThrough(boolean enabled) throws IOException
IOExceptionprotected final ColorizedWriter<T> setDecoration(boolean enabled, BasicDecoration decoration, WriterControlTracker<BasicDecoration> control) throws IOException
IOExceptionCopyright © 2012–2022. All rights reserved.