org.openide.io 1.20.1

org.openide.windows
Class IOColorLines

java.lang.Object
  extended by org.openide.windows.IOColorLines

public abstract class IOColorLines
extends Object

Line printing with custom color.

Client usage:

  // print green line
  InputOutput io = ...;
  IOColorLines.println(io, "Green line", Color.GREEN);
 
How to support IOColorLines in own IOProvider implementation:

Since:
1.16
See Also:
IOColors, IOColorPrint

Constructor Summary
IOColorLines()
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOColorLines

public IOColorLines()
Method Detail

println

public static void println(InputOutput io,
                           CharSequence text,
                           Color color)
                    throws IOException
Prints line with selected color

Parameters:
io - IO to print to
text - a string to print to the tab
color - a color for the line of text (null allowed). If null is passed default color (see IOColors) is used.
Throws:
IOException

println

public static void println(InputOutput io,
                           CharSequence text,
                           OutputListener listener,
                           boolean important,
                           Color color)
                    throws IOException
Prints line with selected color

Parameters:
io - IO to print to
text - a string to print to the tab
listener - a listener that will receive events about this line
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.
Throws:
IOException

isSupported

public static boolean isSupported(InputOutput io)
Checks whether this feature is supported for provided IO

Parameters:
io - IO to check on
Returns:
true if supported

println

protected abstract void println(CharSequence text,
                                OutputListener listener,
                                boolean important,
                                Color color)
                         throws IOException
Prints line with selected color

Parameters:
text - a string to print to the tab
listener - 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.
Throws:
IOException

org.openide.io 1.20.1

Built on December 28 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.