public abstract class IOColors extends Object
Client usage:
// set important hyperlink color to red InputOutput io = ...; IOColors.setColor(io, IOColors.OutputType.HYPERLINK_IMPORTANT, Color.RED);How to support
IOColors
in own IOProvider
implementation:
InputOutput
provided by IOProvider
has to implement Lookup.Provider
IOColors
and implement its abstract methods
IOColors
to Lookup
provided by InputOutput
IOColorLines
,
IOColorPrint
Modifier and Type | Class and Description |
---|---|
static class |
IOColors.OutputType
output types
|
Constructor and Description |
---|
IOColors() |
Modifier and Type | Method and Description |
---|---|
static Color |
getColor(InputOutput io,
IOColors.OutputType type)
Gets current color for output
|
protected abstract Color |
getColor(IOColors.OutputType type)
Gets current color for output
|
static boolean |
isSupported(InputOutput io)
Checks whether this feature is supported for provided IO
|
static void |
setColor(InputOutput io,
IOColors.OutputType type,
Color color)
Sets specified color for output
|
protected abstract void |
setColor(IOColors.OutputType type,
Color color)
Sets specified color for output
|
public static Color getColor(InputOutput io, IOColors.OutputType type)
io
- InputOutput to operate ontype
- output type to get color forpublic static void setColor(InputOutput io, IOColors.OutputType type, Color color)
io
- InputOutput to operate ontype
- output type to set color forcolor
- new color for specified output typepublic static boolean isSupported(InputOutput io)
io
- IO to check onprotected abstract Color getColor(IOColors.OutputType type)
type
- output type to get color forprotected abstract void setColor(IOColors.OutputType type, Color color)
type
- output type to set color forcolor
- new color for specified output type