public abstract class IOColorLines
extends java.lang.Object
Client usage:
// print green line InputOutput io = ...; IOColorLines.println(io, "Green line", Color.GREEN);How to support
IOColorLines in own IOProvider implementation:
InputOutput provided by IOProvider has to implement Lookup.Provider
IOColorLines and implement its abstract methods
IOColorLines to Lookup provided by InputOutput
IOColors,
IOColorPrint| Constructor | Description |
|---|---|
IOColorLines() |
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
isSupported(InputOutput io) |
Checks whether this feature is supported for provided IO
|
protected abstract void |
println(java.lang.CharSequence text,
OutputListener listener,
boolean important,
java.awt.Color color) |
Prints line with selected color
|
static void |
println(InputOutput io,
java.lang.CharSequence text,
java.awt.Color color) |
Prints line with selected color
|
static void |
println(InputOutput io,
java.lang.CharSequence text,
OutputListener listener,
boolean important,
java.awt.Color color) |
Prints line with selected color
|
public static void println(InputOutput io, java.lang.CharSequence text, java.awt.Color color) throws java.io.IOException
io - IO to print totext - a string to print to the tabcolor - a color for the line of text (null allowed). If null is passed default color (see IOColors) is used.java.io.IOExceptionpublic static void println(InputOutput io, java.lang.CharSequence text, OutputListener listener, boolean important, java.awt.Color color) throws java.io.IOException
io - IO to print totext - a string to print to the tablistener - a listener that will receive events about this lineimportant - important mark the line as important.
Makes the UI respond appropriately, eg. stop the automatic scrolling
or highlight the hyperlink.color - a color for the line of text (null allowed). If null is passed default color (see IOColors) is used.java.io.IOExceptionpublic static boolean isSupported(InputOutput io)
io - IO to check onprotected abstract void println(java.lang.CharSequence text,
OutputListener listener,
boolean important,
java.awt.Color color)
throws java.io.IOException
text - a string to print to the tablistener - a listener that will receive events about this line (null allowed)important - important mark the line as important.
Makes the UI respond appropriately, eg. stop the automatic scrolling
or highlight the hyperlink.color - a color for the line of text (null allowed). If null is passed default color (see IOColors) is used.java.io.IOExceptionBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.