Package org.strassburger.tui4j.printer
Class ConsolePrinter
java.lang.Object
org.strassburger.tui4j.printer.ConsolePrinter
- All Implemented Interfaces:
Printer
A Printer implementation that outputs to the console (System.out)
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a ConsolePrinter with the default AnsiRendererConsolePrinter(StyledTextRenderer renderer) Creates a ConsolePrinter with a custom StyledTextRenderer -
Method Summary
Modifier and TypeMethodDescriptionvoidPrint raw text to the outputvoidprint(Renderable renderable) Print a renderable object to the outputvoidprint(StyledText text) Print styled text to the outputvoidFormat and print text to the outputvoidprintf(StyledText format, Object... args) Format and print styled text to the outputvoidFormat and print text to the output with a newlinevoidprintfln(StyledText format, Object... args) Format and print styled text to the output with a newlinevoidprintln()Print a newline to the outputvoidPrint raw text to the output with a newlinevoidprintln(Renderable renderable) Print a renderable object to the output with a newlinevoidprintln(StyledText text) Print styled text to the output with a newline
-
Constructor Details
-
ConsolePrinter
public ConsolePrinter()Creates a ConsolePrinter with the default AnsiRenderer -
ConsolePrinter
Creates a ConsolePrinter with a custom StyledTextRenderer- Parameters:
renderer- the StyledTextRenderer to use for rendering styled text
-
-
Method Details
-
print
Description copied from interface:PrinterPrint raw text to the output -
print
Description copied from interface:PrinterPrint styled text to the output -
print
Description copied from interface:PrinterPrint a renderable object to the output -
println
public void println()Description copied from interface:PrinterPrint a newline to the output -
println
Description copied from interface:PrinterPrint raw text to the output with a newline -
println
Description copied from interface:PrinterPrint styled text to the output with a newline -
println
Description copied from interface:PrinterPrint a renderable object to the output with a newline -
printf
Description copied from interface:PrinterFormat and print text to the output -
printfln
Description copied from interface:PrinterFormat and print text to the output with a newline -
printf
Description copied from interface:PrinterFormat and print styled text to the output -
printfln
Description copied from interface:PrinterFormat and print styled text to the output with a newline
-