net.infonode.gui.colorprovider
Class BackgroundPainterColorProvider
java.lang.Object
net.infonode.gui.colorprovider.AbstractColorProvider
net.infonode.gui.colorprovider.BackgroundPainterColorProvider
- All Implemented Interfaces:
- java.io.Serializable, ColorProvider
public class BackgroundPainterColorProvider
- extends AbstractColorProvider
- implements java.io.Serializable
Finds the most suitable background color of a component.
If the component has a ComponentPainter
that paint its background, like for example a shaped panel, the
color is taken from this painter, otherwise the component background color is used.
- Version:
- $Revision: 1.7 $
- Author:
- $Author: jesper $
- See Also:
- Serialized Form
Method Summary |
java.awt.Color |
getColor(java.awt.Component component)
Returns the color obtained from the given component. |
protected java.lang.Object |
readResolve()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
INSTANCE
public static final BackgroundPainterColorProvider INSTANCE
- The only instance of this class.
BackgroundPainterColorProvider
private BackgroundPainterColorProvider()
getColor
public java.awt.Color getColor(java.awt.Component component)
- Description copied from interface:
ColorProvider
- Returns the color obtained from the given component.
- Specified by:
getColor
in interface ColorProvider
- Overrides:
getColor
in class AbstractColorProvider
- Parameters:
component
- the component
- Returns:
- the color obtained from the given component
readResolve
protected java.lang.Object readResolve()
throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException