java.lang.Object
java.io.Writer
java.io.PrintWriter
de.grogra.pf.ui.Console.ConsoleWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
- Enclosing interface:
- Console
A
ConsoleWriter
is a PrintWriter
with the additional possibility to set the text color
to use.- Author:
- Ole Kniemeyer
-
Field Summary
Fields inherited from class java.io.PrintWriter
out
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
Methods inherited from class java.io.Writer
nullWriter
-
Constructor Details
-
ConsoleWriter
-
-
Method Details
-
print
Printstext
using the color encoded incolor
. Thecolor
has to be specified in Java's default sRGB color model (0xrrggbb
).- Parameters:
text
- text to printcolor
- color to use (0xrrggbb
)
-
println
Printstext
using the color encoded incolor
, then terminates the line. Thecolor
has to be specified in Java's default sRGB color model (0xrrggbb
).- Parameters:
text
- text to printcolor
- color to use (0xrrggbb
)
-