net.infonode.gui.componentpainter

Class GradientComponentPainter

public class GradientComponentPainter extends AbstractComponentPainter implements Serializable

A painter that paints an gradient area specified by four corner colors.

Version: $Revision: 1.11 $

Author: $Author: jesper $

Constructor Summary
GradientComponentPainter(Color topLeftColor, Color topRightColor, Color bottomLeftColor, Color bottomRightColor)
Constructor.
GradientComponentPainter(ColorProvider topLeftColor, ColorProvider topRightColor, ColorProvider bottomLeftColor, ColorProvider bottomRightColor)
Constructor.
Method Summary
ColorgetColor(Component component)
booleanisOpaque(Component component)
voidpaint(Component component, Graphics g, int x, int y, int width, int height, Direction direction, boolean horizontalFlip, boolean verticalFlip)

Constructor Detail

GradientComponentPainter

public GradientComponentPainter(Color topLeftColor, Color topRightColor, Color bottomLeftColor, Color bottomRightColor)
Constructor.

Parameters: topLeftColor the top left corner color topRightColor the top right corner color bottomLeftColor the bottom left corner color bottomRightColor the bottom right corner color

GradientComponentPainter

public GradientComponentPainter(ColorProvider topLeftColor, ColorProvider topRightColor, ColorProvider bottomLeftColor, ColorProvider bottomRightColor)
Constructor.

Parameters: topLeftColor the top left corner color provider topRightColor the top right corner color provider bottomLeftColor the bottom left corner color provider bottomRightColor the bottom right corner color provider

Method Detail

getColor

public Color getColor(Component component)

isOpaque

public boolean isOpaque(Component component)

paint

public void paint(Component component, Graphics g, int x, int y, int width, int height, Direction direction, boolean horizontalFlip, boolean verticalFlip)