public abstract class IOColorLines extends 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 and Description |
---|
IOColorLines() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isSupported(InputOutput io)
Checks whether this feature is supported for provided IO
|
protected abstract void |
println(CharSequence text,
OutputListener listener,
boolean important,
Color color)
Prints line with selected color
|
static void |
println(InputOutput io,
CharSequence text,
Color color)
Prints line with selected color
|
static void |
println(InputOutput io,
CharSequence text,
OutputListener listener,
boolean important,
Color color)
Prints line with selected color
|
public static void println(InputOutput io, CharSequence text, Color color) throws 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.IOException
public static void println(InputOutput io, CharSequence text, OutputListener listener, boolean important, Color color) throws 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.IOException
public static boolean isSupported(InputOutput io)
io
- IO to check onprotected abstract void println(CharSequence text, OutputListener listener, boolean important, Color color) throws 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.IOException
Built on June 4 2024. | Copyright © 2017-2024 Apache Software Foundation. All Rights Reserved.