|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.effects.DropShadowDecorator
public class DropShadowDecorator
Decorator that adds a drop shadows to a component.
| Field Summary | |
|---|---|
static float |
DEFAULT_SHADOW_OPACITY
|
| Constructor Summary | |
|---|---|
DropShadowDecorator()
|
|
DropShadowDecorator(int blurRadius,
int xOffset,
int yOffset)
|
|
| Method Summary | |
|---|---|
int |
getBlurRadius()
Returns the blur radius used to draw the shadow. |
Bounds |
getBounds(Component component)
Returns the bounding area of the decorator. |
Color |
getShadowColor()
Returns the color used to draw the shadow. |
float |
getShadowOpacity()
Returns the opacity used to draw the shadow. |
AffineTransform |
getTransform(Component component)
Returns the transformation the decorator applies to the component's coordinate space. |
int |
getXOffset()
Returns the amount that the drop shadow will be offset along the x axis. |
int |
getYOffset()
Returns the amount that the drop shadow will be offset along the y axis. |
Graphics2D |
prepare(Component component,
Graphics2D graphics)
Prepares the graphics context into which the component or prior decorator will paint. |
void |
setBlurRadius(int blurRadius)
Sets the blur radius used to draw the shadow. |
void |
setShadowColor(Color shadowColor)
Sets the color used to draw the shadow. |
void |
setShadowColor(String shadowColor)
Sets the color used to draw the shadow. |
void |
setShadowOpacity(float shadowOpacity)
Sets the opacity used to draw the shadow. |
void |
setXOffset(int xOffset)
Sets the amount that the drop shadow will be offset along the x axis. |
void |
setYOffset(int yOffset)
Sets the amount that the drop shadow will be offset along the y axis. |
void |
update()
Updates the graphics context into which the component or prior decorator was painted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float DEFAULT_SHADOW_OPACITY
| Constructor Detail |
|---|
public DropShadowDecorator()
public DropShadowDecorator(int blurRadius,
int xOffset,
int yOffset)
| Method Detail |
|---|
public Color getShadowColor()
public void setShadowColor(Color shadowColor)
shadowColor - The color used to draw the shadow.public final void setShadowColor(String shadowColor)
shadowColor - The color used to draw the shadow, which can be any of the
color values recognized by Pivot.public float getShadowOpacity()
public void setShadowOpacity(float shadowOpacity)
shadowOpacity - The opacity used to draw the shadow.public int getBlurRadius()
public void setBlurRadius(int blurRadius)
blurRadius - The blur radius used to draw the shadow.public int getXOffset()
public void setXOffset(int xOffset)
xOffset - The x offset used to draw the shadowpublic int getYOffset()
public void setYOffset(int yOffset)
yOffset - The y offset used to draw the shadow
public Graphics2D prepare(Component component,
Graphics2D graphics)
DecoratorComponent.paint(Graphics2D); decorators are called in
descending order.
prepare in interface Decoratorpublic void update()
DecoratorComponent.paint(Graphics2D); decorators are called in
ascending order.
update in interface Decoratorpublic Bounds getBounds(Component component)
Decorator
getBounds in interface Decoratorpublic AffineTransform getTransform(Component component)
Decorator
getTransform in interface Decorator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||