net.nexttext.behaviour.standard
Class Colorize

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.standard.Colorize
All Implemented Interfaces:
Action

public class Colorize
extends AbstractAction

Fades the color of an object to a new color over time.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Colorize(java.awt.Color color, float speed)
          The Colorize action will only influence the fill colour.
Colorize(java.awt.Color color, float speed, boolean fill, boolean stroke)
          The Colorize action is applied to the given glyph colour component (i.e.
Colorize(java.awt.Color colorFill, float speedFill, java.awt.Color colorStroke, float speedStroke)
          The Colorize action is applied to the fill and the stroke colours, according to the given values.
 
Method Summary
 Action.ActionResult behave(TextObject to)
          Default behave method for single objects.
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, complete, getDisplayName, getRequiredProperties, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Colorize

public Colorize(java.awt.Color color,
                float speed)
The Colorize action will only influence the fill colour.

This constructor is kept for code consistency with code that was using Colorize prior to the implementation of the stroke property.

Parameters:
color - The target color
speed - The speed factor at which the colorization is applied

Colorize

public Colorize(java.awt.Color color,
                float speed,
                boolean fill,
                boolean stroke)
The Colorize action is applied to the given glyph colour component (i.e. the stroke and/or the fill)

Parameters:
color - The target color
speed - The speed factor at which the colorization is applied
fill - Indicates if the action has to be processed on the fill
stroke - Indicates if the action has to be processed on the stroke

Colorize

public Colorize(java.awt.Color colorFill,
                float speedFill,
                java.awt.Color colorStroke,
                float speedStroke)
The Colorize action is applied to the fill and the stroke colours, according to the given values.

Parameters:
colorFill - The target color of the fill
speedFill - The colorization speed for the fill
colorStroke - The target color of the stroke
speedStroke - The colorization speed for the stroke
Method Detail

behave

public Action.ActionResult behave(TextObject to)
Description copied from class: AbstractAction
Default behave method for single objects.

This method does nothing; it should be overriden by subclasses if they wish to support actions on single objects.

Trying to call this method on an Action which doesn't override it will throw an UnsupportedActionException.

Specified by:
behave in interface Action
Overrides:
behave in class AbstractAction