org.apache.pivot.wtk.effects
Class SaturationDecorator

java.lang.Object
  extended by org.apache.pivot.wtk.effects.SaturationDecorator
All Implemented Interfaces:
Decorator

public class SaturationDecorator
extends Object
implements Decorator

Decorator that modifies the color saturation of a component.


Constructor Summary
SaturationDecorator()
           
SaturationDecorator(float multiplier)
           
 
Method Summary
 Bounds getBounds(Component component)
          Returns the bounding area of the decorator.
 float getMultiplier()
           
 AffineTransform getTransform(Component component)
          Returns the transformation the decorator applies to the component's coordinate space.
 Graphics2D prepare(Component component, Graphics2D graphicsArgument)
          Prepares the graphics context into which the component or prior decorator will paint.
 void setMultiplier(float multiplier)
           
 void setMultiplier(Number multiplier)
           
 void update()
          Adjusts the saturation of the component image and draws the resulting image using the component's graphics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaturationDecorator

public SaturationDecorator()

SaturationDecorator

public SaturationDecorator(float multiplier)
Method Detail

getMultiplier

public float getMultiplier()

setMultiplier

public void setMultiplier(float multiplier)

setMultiplier

public void setMultiplier(Number multiplier)

prepare

public Graphics2D prepare(Component component,
                          Graphics2D graphicsArgument)
Description copied from interface: Decorator
Prepares the graphics context into which the component or prior decorator will paint. This method is called immediately prior to Component.paint(Graphics2D); decorators are called in descending order.

Specified by:
prepare in interface Decorator
Returns:
The graphics context that should be used by the component or prior decorators.

update

public void update()
Adjusts the saturation of the component image and draws the resulting image using the component's graphics.

Specified by:
update in interface Decorator

getBounds

public Bounds getBounds(Component component)
Description copied from interface: Decorator
Returns the bounding area of the decorator.

Specified by:
getBounds in interface Decorator
Returns:
The decorator's bounds, relative to the component's origin.

getTransform

public AffineTransform getTransform(Component component)
Description copied from interface: Decorator
Returns the transformation the decorator applies to the component's coordinate space.

Specified by:
getTransform in interface Decorator
Returns:
The decorator's transform.