Module platform

Class Console.ConsoleWriter

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

public abstract static class Console.ConsoleWriter extends PrintWriter
A ConsoleWriter is a PrintWriter with the additional possibility to set the text color to use.
Author:
Ole Kniemeyer
  • Constructor Details

    • ConsoleWriter

      public ConsoleWriter(Writer out, boolean autoFlush)
  • Method Details

    • print

      public abstract void print(Object text, int color)
      Prints text using the color encoded in color. The color has to be specified in Java's default sRGB color model (0xrrggbb).
      Parameters:
      text - text to print
      color - color to use (0xrrggbb)
    • println

      public abstract void println(Object text, int color)
      Prints text using the color encoded in color, then terminates the line. The color has to be specified in Java's default sRGB color model (0xrrggbb).
      Parameters:
      text - text to print
      color - color to use (0xrrggbb)