Groovy Documentation

griffon.effects
[Groovy] Class EffectUtil

java.lang.Object
  griffon.effects.EffectUtil

final class EffectUtil
extends Object

Authors:
Andres Almiray


Field Summary
private static Map DEFAULT_PARAMS

protected static Closure NO_CALLBACK

 
Constructor Summary
EffectUtil()

 
Method Summary
static Map mergeParams(Map params, Map overrides = [:])

static org.pushingpixels.trident.Timeline newTimeline(Effect effect)

Creates a new Timeline using the effect's parameters

static void setupAfterCallback(Effect effect, org.pushingpixels.trident.Timeline timeline)

Sets the Effect's afterCallback to be called once the timeline ends.

static void setupCallback(org.pushingpixels.trident.Timeline timeline, Closure callback)

Sets the callback to be called once the timeline ends.

static void setupEffectCallback(Effect effect, org.pushingpixels.trident.Timeline timeline)

Sets the Effect's callback to be called once the timeline ends.

static CountDownLatch setupWaitForCompletion(Effect effect, org.pushingpixels.trident.Timeline timeline)

Creates a CountDonwLatch associated with the Timeline.

static double toDouble(def value, double defaultValue = 0.0d)

static float toFloat(def value, float defaultValue = 0.0f)

static int toInt(def value, int defaultValue = 0i)

static long toLong(def value, long defaultValue = 0l)

static String toString(Effect effect)

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

Field Detail

DEFAULT_PARAMS

private static final Map DEFAULT_PARAMS


NO_CALLBACK

protected static final Closure NO_CALLBACK


 
Constructor Detail

EffectUtil

EffectUtil()


 
Method Detail

mergeParams

static Map mergeParams(Map params, Map overrides = [:])


newTimeline

static org.pushingpixels.trident.Timeline newTimeline(Effect effect)
Creates a new Timeline using the effect's parameters
Parameters:
effect - - the effect that contains timeline parameters
Returns:
a newly created Timeline


setupAfterCallback

static void setupAfterCallback(Effect effect, org.pushingpixels.trident.Timeline timeline)
Sets the Effect's afterCallback to be called once the timeline ends.

Parameters:
effect - the source Effect.
timeline - the target Timeline.


setupCallback

static void setupCallback(org.pushingpixels.trident.Timeline timeline, Closure callback)
Sets the callback to be called once the timeline ends.

Parameters:
timeline - the target Timeline.
callback - a Closure. Will be ignored if null.


setupEffectCallback

static void setupEffectCallback(Effect effect, org.pushingpixels.trident.Timeline timeline)
Sets the Effect's callback to be called once the timeline ends.

Parameters:
effect - the source Effect.
timeline - the target Timeline.


setupWaitForCompletion

static CountDownLatch setupWaitForCompletion(Effect effect, org.pushingpixels.trident.Timeline timeline)
Creates a CountDonwLatch associated with the Timeline. Forces the calling thrad to wait.

Parameters:
effect - the source Effect.
timeline - the target Timeline.
Returns:
a CountDonwLatch on which the calling hread can wait. May be null.


toDouble

static double toDouble(def value, double defaultValue = 0.0d)


toFloat

static float toFloat(def value, float defaultValue = 0.0f)


toInt

static int toInt(def value, int defaultValue = 0i)


toLong

static long toLong(def value, long defaultValue = 0l)


toString

static String toString(Effect effect)


 

Groovy Documentation