Groovy Documentation

griffon.effects
[Groovy] Class AbstractEffect

java.lang.Object
  griffon.effects.AbstractEffect
All Implemented Interfaces:
Effect

abstract class AbstractEffect
extends Object

Base class for all Effects.

The following parameters are shared across all effects unless otherwise specified

Authors:
Andres Almiray


Field Summary
private Map params

 
Property Summary
Closure afterCallback

callback to be executed after the effect ends

Closure beforeCallback

callback to be executed before the effect starts

Closure callback

end-of-animation callback

Component component

effect component

boolean waitForCompletion

wait flag

 
Constructor Summary
AbstractEffect(Map params = [:], Component component, Closure callback = null)

Creates a new effect.

 
Method Summary
protected void doBeforePlay()

Last opportunity to execute custom code before the Timeline starts

Map getParams()

Returns an unmodifiable view of the effect's arguments

protected Map paramsInternal()

Mutable view of the effect's parameters.

void run()

Runs the timeline.

protected void setupTimeline(org.pushingpixels.trident.Timeline timeline)

Configures the Timeline for this effect

String toString()

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

params

private final Map params


 
Property Detail

afterCallback

Closure afterCallback
callback to be executed after the effect ends


beforeCallback

Closure beforeCallback
callback to be executed before the effect starts


callback

final Closure callback
end-of-animation callback


component

final Component component
effect component


waitForCompletion

final boolean waitForCompletion
wait flag


 
Constructor Detail

AbstractEffect

AbstractEffect(Map params = [:], Component component, Closure callback = null)
Creates a new effect.
Parameters:
params - - set of options
component - - the component to animate
callback - - an optional callback to be executed at the end of the animation


 
Method Detail

doBeforePlay

protected void doBeforePlay()
Last opportunity to execute custom code before the Timeline starts


getParams

Map getParams()
Returns an unmodifiable view of the effect's arguments
Returns:
a Map with the effect's parameters including default settings.


paramsInternal

protected Map paramsInternal()
Mutable view of the effect's parameters.

For internal use only.

Returns:
a Map with the effect's parameters including default settings.


run

void run()
Runs the timeline.

Creates and setups the timeline and callbacks, then plays the timeline.

If a callback was supplied it will be called at the end of the animation, with the component and supplied parameters as arguments.


setupTimeline

protected void setupTimeline(org.pushingpixels.trident.Timeline timeline)
Configures the Timeline for this effect

Parameters:
timeline - - a timeline on which properties to interpolate can be set


toString

String toString()


 

Groovy Documentation