|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.effects.WatermarkDecorator
public class WatermarkDecorator
Decorator that paints a watermark effect over a component.
Constructor Summary | |
---|---|
WatermarkDecorator()
Cretes a new WatermarkDecorator with no text or image. |
|
WatermarkDecorator(Image image)
Cretes a new WatermarkDecorator with no text and the specified image. |
|
WatermarkDecorator(java.lang.String text)
Cretes a new WatermarkDecorator with the specified string as its text and no image. |
|
WatermarkDecorator(java.lang.String text,
Image image)
Cretes a new WatermarkDecorator with the specified text and image. |
Method Summary | |
---|---|
Bounds |
getBounds(Component component)
Returns the bounding area of the decorator. |
java.awt.Font |
getFont()
Gets the font that will be used when painting this decorator's text. |
Image |
getImage()
Gets the image that will be painted over this decorator's component. |
float |
getOpacity()
Gets the opacity of the watermark. |
java.lang.String |
getText()
Gets the text that will be painted over this decorator's component. |
double |
getTheta()
Gets the angle at the watermark will be painted, in radians. |
java.awt.geom.AffineTransform |
getTransform(Component component)
Returns the transformation the decorator applies to the component's coordinate space. |
java.awt.Graphics2D |
prepare(Component component,
java.awt.Graphics2D graphics)
Prepares the graphics context into which the component or prior decorator will paint. |
void |
setFont(java.awt.Font font)
Sets the font that will be used when painting this decorator's text. |
void |
setFont(java.lang.String font)
Sets the font that will be used when painting this decorator's text. |
void |
setImage(Image image)
Sets the image that will be painted over this decorator's component. |
void |
setImage(java.lang.String image)
Sets the image that will be painted over this decorator's component. |
void |
setImage(java.net.URL image)
Sets the image that will be painted over this decorator's component. |
void |
setOpacity(float opacity)
Sets the opacity of the watermark. |
void |
setText(java.lang.String text)
Sets the text that will be painted over this decorator's component. |
void |
setTheta(double theta)
Sets the angle at the watermark will be painted, in radians. |
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 |
Constructor Detail |
---|
public WatermarkDecorator()
public WatermarkDecorator(java.lang.String text)
text
- The text to paint over the decorated componentpublic WatermarkDecorator(Image image)
image
- The image to paint over the decorated componentpublic WatermarkDecorator(java.lang.String text, Image image)
text
- The text to paint over the decorated componentimage
- The image to paint over the decorated componentMethod Detail |
---|
public java.lang.String getText()
public void setText(java.lang.String text)
text
- This decorator's textpublic java.awt.Font getFont()
public void setFont(java.awt.Font font)
font
- This decorator's fontpublic final void setFont(java.lang.String font)
font
- This decorator's fontpublic Image getImage()
public void setImage(Image image)
image
- This decorator's imagepublic void setImage(java.net.URL image)
image
- This decorator's imagepublic void setImage(java.lang.String image)
image
- This decorator's imagepublic float getOpacity()
public void setOpacity(float opacity)
opacity
- This decorator's opacitypublic double getTheta()
public void setTheta(double theta)
theta
- This decorator's watermark anglepublic java.awt.Graphics2D prepare(Component component, java.awt.Graphics2D graphics)
Decorator
Component.paint(Graphics2D)
; decorators are called in
descending order.
prepare
in interface Decorator
public void update()
Decorator
Component.paint(Graphics2D)
; decorators are called in
ascending order.
update
in interface Decorator
public Bounds getBounds(Component component)
Decorator
getBounds
in interface Decorator
public java.awt.geom.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 |