net.infonode.gui.colorprovider
Class FixedColorProvider

java.lang.Object
  extended by net.infonode.gui.colorprovider.AbstractColorProvider
      extended by net.infonode.gui.colorprovider.FixedColorProvider
All Implemented Interfaces:
java.io.Serializable, ColorProvider

public class FixedColorProvider
extends AbstractColorProvider
implements java.io.Serializable

A ColorProvider which always returns the same color.

Version:
$Revision: 1.7 $
Author:
$Author: jesper $
See Also:
Serialized Form

Field Summary
static FixedColorProvider BLACK
          A provider for the color black.
private  java.awt.Color color
           
private static long serialVersionUID
           
static FixedColorProvider WHITE
          A provider for the color white.
 
Constructor Summary
FixedColorProvider(java.awt.Color color)
          Constructor.
 
Method Summary
 java.awt.Color getColor()
          Returns the default color when no component is available.
protected  java.lang.Object readResolve()
           
 
Methods inherited from class net.infonode.gui.colorprovider.AbstractColorProvider
getColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

BLACK

public static final FixedColorProvider BLACK
A provider for the color black.


WHITE

public static final FixedColorProvider WHITE
A provider for the color white.


color

private final java.awt.Color color
Constructor Detail

FixedColorProvider

public FixedColorProvider(java.awt.Color color)
Constructor.

Parameters:
color - the color which this provider will return
Method Detail

getColor

public java.awt.Color getColor()
Description copied from interface: ColorProvider
Returns the default color when no component is available.

Specified by:
getColor in interface ColorProvider
Overrides:
getColor in class AbstractColorProvider
Returns:
the default color when no component is available

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException