|
org.openide.io 1.23.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.windows.IOColorPrint
public abstract class IOColorPrint
Text printing with custom color.
Client usage:
InputOutput io = ...; OutputListener l = ...; OutputListener l2 = ...; IOColorPrint.print(io, "Green text", Color.GREEN); IOColorPrint.print(io, " orange hyperlink ", l, false, Color.ORANGE); IOColorPrint.print(io, " green hyperlink\n", l2, false, Color.GREEN);How to support
IOColorPrint
in own IOProvider
implementation:
InputOutput
provided by IOProvider
has to implement Lookup.Provider
IOColorPrint
and implement its abstract methods
IOColorPrint
to Lookup
provided by InputOutput
IOColors
,
IOColorLines
Constructor Summary | |
---|---|
IOColorPrint()
|
Method Summary | |
---|---|
static boolean |
isSupported(InputOutput io)
Checks whether this feature is supported for provided IO |
protected abstract void |
print(CharSequence text,
OutputListener listener,
boolean important,
Color color)
Prints text with selected color and optionaly add listener for it |
static void |
print(InputOutput io,
CharSequence text,
Color color)
Prints text with selected color |
static void |
print(InputOutput io,
CharSequence text,
OutputListener listener,
boolean important,
Color color)
Prints text with selected color and add listener for it |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IOColorPrint()
Method Detail |
---|
public static void print(InputOutput io, CharSequence text, Color color) throws IOException
io
- IO to print totext
- a string to print to the tabcolor
- a color for the text (null allowed). If null is passed default color (see IOColors
) is used.
IOException
public static void print(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 text (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 text (null allowed). If null is passed default color (see IOColors
) is used.
IOException
public static boolean isSupported(InputOutput io)
io
- IO to check on
protected abstract void print(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 text (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 text (null allowed). If null is passed default color (see IOColors
) is used.
IOException
|
org.openide.io 1.23.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |