|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.infonode.gui.componentpainter.AbstractComponentPainter
net.infonode.gui.componentpainter.GradientComponentPainter
A painter that paints an gradient area specified by four corner colors.
Constructor Summary | |
GradientComponentPainter(Color topLeftColor,
Color topRightColor,
Color bottomLeftColor,
Color bottomRightColor)
Constructor. |
|
GradientComponentPainter(ColorProvider topLeftColor,
ColorProvider topRightColor,
ColorProvider bottomLeftColor,
ColorProvider bottomRightColor)
Constructor. |
Method Summary | |
Color |
getColor(Component component)
Returns an approximate average color of the pixels painted by this painter. |
boolean |
isOpaque(Component component)
Returns true if this painter paints the entire area with an opaque color. |
void |
paint(Component component,
Graphics g,
int x,
int y,
int width,
int height,
Direction direction,
boolean horizontalFlip,
boolean verticalFlip)
Paints an area in a specific direction and optinally flipped horizontally and/or vertically. |
Methods inherited from class net.infonode.gui.componentpainter.AbstractComponentPainter |
paint |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GradientComponentPainter(Color topLeftColor, Color topRightColor, Color bottomLeftColor, Color bottomRightColor)
topLeftColor
- the top left corner colortopRightColor
- the top right corner colorbottomLeftColor
- the bottom left corner colorbottomRightColor
- the bottom right corner colorpublic GradientComponentPainter(ColorProvider topLeftColor, ColorProvider topRightColor, ColorProvider bottomLeftColor, ColorProvider bottomRightColor)
topLeftColor
- the top left corner color providertopRightColor
- the top right corner color providerbottomLeftColor
- the bottom left corner color providerbottomRightColor
- the bottom right corner color providerMethod Detail |
public void paint(Component component, Graphics g, int x, int y, int width, int height, Direction direction, boolean horizontalFlip, boolean verticalFlip)
ComponentPainter
paint
in interface ComponentPainter
paint
in class AbstractComponentPainter
public boolean isOpaque(Component component)
ComponentPainter
isOpaque
in interface ComponentPainter
isOpaque
in class AbstractComponentPainter
public Color getColor(Component component)
ComponentPainter
component
- the component to paint on
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |