Package org.apache.pivot.wtk.effects
Class TranslationDecorator
- java.lang.Object
-
- org.apache.pivot.wtk.effects.TranslationDecorator
-
-
Constructor Summary
Constructors Constructor Description TranslationDecorator()TranslationDecorator(boolean clip)TranslationDecorator(int x, int y, boolean clip)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundsgetBounds(Component component)Returns the bounding area of the decorator.booleangetClip()PointgetOffset()java.awt.geom.AffineTransformgetTransform(Component component)Returns the transformation the decorator applies to the component's coordinate space.intgetX()intgetY()java.awt.Graphics2Dprepare(Component component, java.awt.Graphics2D graphics)Prepares the graphics context into which the component or prior decorator will paint.voidsetClip(boolean clip)voidsetOffset(int x, int y)voidsetOffset(Point offset)voidsetX(int x)voidsetY(int y)voidupdate()Updates the graphics context into which the component or prior decorator was painted.
-
-
-
Method Detail
-
getX
public int getX()
-
setX
public void setX(int x)
-
getY
public int getY()
-
setY
public void setY(int y)
-
getOffset
public Point getOffset()
-
setOffset
public void setOffset(Point offset)
-
setOffset
public void setOffset(int x, int y)
-
getClip
public boolean getClip()
-
setClip
public void setClip(boolean clip)
-
prepare
public java.awt.Graphics2D prepare(Component component, java.awt.Graphics2D graphics)
Description copied from interface:DecoratorPrepares the graphics context into which the component or prior decorator will paint. This method is called immediately prior toComponent.paint(Graphics2D); decorators are called in descending order.
-
update
public void update()
Description copied from interface:DecoratorUpdates the graphics context into which the component or prior decorator was painted. This method is called immediately afterComponent.paint(Graphics2D); decorators are called in ascending order.This default version simply returns, without doing anything (often the appropriate thing to do).
-
getBounds
public Bounds getBounds(Component component)
Description copied from interface:DecoratorReturns the bounding area of the decorator.This default simply returns the bounds of the component's size.
-
getTransform
public java.awt.geom.AffineTransform getTransform(Component component)
Description copied from interface:DecoratorReturns the transformation the decorator applies to the component's coordinate space.This default simply returns a new
AffineTransform.- Specified by:
getTransformin interfaceDecorator- Parameters:
component- The component the decorator is attached to.- Returns:
- The decorator's transform.
-
-