org.openide.io 1.16.1

org.openide.windows
Class IOColors

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

public abstract class IOColors
extends Object

Settings of colors for normal, error, hyperlink, important hyperlink lines. Change is global for text past and future.

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:

Since:
1.16

Nested Class Summary
static class IOColors.OutputType
          output types
 
Constructor Summary
IOColors()
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOColors

public IOColors()
Method Detail

getColor

public static Color getColor(InputOutput io,
                             IOColors.OutputType type)
Gets current color for output

Parameters:
io - InputOutput to operate on
type - output type to get color for
Returns:
current color for specified output type or null if not supported

setColor

public static void setColor(InputOutput io,
                            IOColors.OutputType type,
                            Color color)
Sets specified color for output

Parameters:
io - InputOutput to operate on
type - output type to set color for
color - new color for specified output type

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

getColor

protected abstract Color getColor(IOColors.OutputType type)
Gets current color for output

Parameters:
type - output type to get color for
Returns:
current color for specified output

setColor

protected abstract void setColor(IOColors.OutputType type,
                                 Color color)
Sets specified color for output

Parameters:
type - output type to set color for
color - new color for specified output type

org.openide.io 1.16.1

Built on September 9 2009.  |  Portions Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.