org.odlabs.wiquery.core.effects
Class Animate

java.lang.Object
  extended by org.odlabs.wiquery.core.effects.Animate
All Implemented Interfaces:
Serializable, ChainableStatement

public class Animate
extends Object
implements ChainableStatement, Serializable

$Id$

ChainableStatement to bind the animate method on the wicket elements with jQuery

See http://api.jquery.com/animate/

Since:
1.2
Author:
Julien Roche
See Also:
Serialized Form

Constructor Summary
Animate(Map<String,String> properties, AnimateDuration duration)
          Constructor
Animate(Map<String,String> properties, AnimateDuration duration, String easing)
          Constructor
Animate(Map<String,String> properties, AnimateDuration duration, String easing, JsScope callback)
          Constructor
Animate(Map<String,String> properties, Map<String,Serializable> options)
          Constructor
 
Method Summary
 String chainLabel()
          
 JsScope getComplete()
           
 AnimateDuration getDuration()
           
 String getEasing()
           
 Map<String,String> getSpecialEasing()
           
 JsScope getStep()
           
 Boolean isQueue()
           
 Animate setComplete(JsScope complete)
          Set the complete option
 Animate setDuration(AnimateDuration duration)
          Set the duration option
 Animate setEasing(String easing)
          Set the easing option
 Animate setSpecialEasing(HashMap<String,String> specialEasing)
          Set the specialEasing option
 Animate setStep(Boolean queue)
          Set the queue option
 Animate setStep(JsScope step)
          Set the step option
 CharSequence[] statementArgs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animate

public Animate(Map<String,String> properties,
               AnimateDuration duration)
Constructor

Parameters:
properties - Map of CSS properties
duration - Duration of the effect

Animate

public Animate(Map<String,String> properties,
               AnimateDuration duration,
               String easing)
Constructor

Parameters:
properties - Map of CSS properties
duration - Duration of the effect
easing - Name of the easing method (linear, swing ...)

Animate

public Animate(Map<String,String> properties,
               AnimateDuration duration,
               String easing,
               JsScope callback)
Constructor

Parameters:
properties - Map of CSS properties
duration - Duration of the effect
easing - Name of the easing method (linear, swing ...)
callback - Callback for the end of the animation

Animate

public Animate(Map<String,String> properties,
               Map<String,Serializable> options)
Constructor

Parameters:
properties - Map of CSS properties
options - Map of options (duration, easing, complete, step, queue, specialEasing) # duration: A string or number determining how long the animation will run. # easing: A string indicating which easing function to use for the transition. # complete: A function to call once the animation is complete. # step: A function to be called after each step of the animation. # queue: A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. # specialEasing: A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions
Method Detail

chainLabel

public String chainLabel()

Specified by:
chainLabel in interface ChainableStatement
Returns:
the statement label (like each, css...)
See Also:
ChainableStatement.chainLabel()

getComplete

public JsScope getComplete()
Returns:
the complete option

getDuration

public AnimateDuration getDuration()
Returns:
the duration option

getEasing

public String getEasing()
Returns:
the duration option

getSpecialEasing

public Map<String,String> getSpecialEasing()
Returns:
the specialEasing

getStep

public JsScope getStep()
Returns:
the step option

isQueue

public Boolean isQueue()
Returns:
the queue option

setComplete

public Animate setComplete(JsScope complete)
Set the complete option

Parameters:
complete - Complete
Returns:
the current instance of the animation

setDuration

public Animate setDuration(AnimateDuration duration)
Set the duration option

Parameters:
duration - Duration
Returns:
the current instance of the animation

setEasing

public Animate setEasing(String easing)
Set the easing option

Parameters:
easing - Easing
Returns:
the current instance of the animation

setSpecialEasing

public Animate setSpecialEasing(HashMap<String,String> specialEasing)
Set the specialEasing option

Parameters:
specialEasing - Queue
Returns:
the current instance of the animation

setStep

public Animate setStep(Boolean queue)
Set the queue option

Parameters:
queue - Queue
Returns:
the current instance of the animation

setStep

public Animate setStep(JsScope step)
Set the step option

Parameters:
step - Step
Returns:
the current instance of the animation

statementArgs

public CharSequence[] statementArgs()
Specified by:
statementArgs in interface ChainableStatement
Returns:
the list of arguments passed to the statement.


Copyright © 2012. All Rights Reserved.