org.wicketstuff.yui.behavior.animation
Class YuiAnimation

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.wicketstuff.yui.behavior.animation.YuiAnimation
All Implemented Interfaces:
Serializable, org.apache.wicket.behavior.IBehavior, org.apache.wicket.behavior.IComponentConfigurationBehavior, org.apache.wicket.IClusterable, org.apache.wicket.markup.html.IHeaderContributor

public class YuiAnimation
extends org.apache.wicket.behavior.AbstractBehavior

YUI Animation container. This Animation acts as a container of a sequence of effects. which will animate in sequence upon an event. Animation needs to be attached to a Component. The list of triggers allow this animation on the component to be triggered by multiple points. (multiple triggers) If more Animation objects are added to a component, they are kept in an array in the Javascript Animator and are cycled through. (chaining) e.g. Component1.add(new Animation1(OnClick)); Component1.add(new Animation2(OnClick)); where Animation1 has a "Blind Down" effect and Animation2 is a "Blind Up" effect. upon the first click Component1 will "Blind Down" and the second click will "Blind Up" etc... YAHOO.util.Anim / Motion / Scroll. Also include Effects from http://blog.davglass.com/files/yui/effects/ TODO : change to YuiLoaderContributor

Author:
josh
See Also:
Serialized Form

Constructor Summary
YuiAnimation(OnEvent onEvent)
          Constructor for an Animation that will be triggered when the 'event' occurs on the attached Component.
YuiAnimation(OnEvent onEvent, org.apache.wicket.Component component)
          Constructor for an Anmation that will be triggered by the component
YuiAnimation(OnEvent onEvent, org.apache.wicket.Component component, org.apache.wicket.markup.html.form.FormComponent<?> element, String value)
           
YuiAnimation(OnEvent onEvent, String triggerId)
          Constructor for an Animation that will be triggered by the triggerId.
 
Method Summary
 YuiAnimation addEffect(YuiAnimEffect effect)
          adds an Anim Effect to the list of Effects that will be batched up and run one after another.
 YuiAnimation addTrigger(org.apache.wicket.Component component)
          adds a component which will be a trigger
 YuiAnimation addTrigger(String triggerId)
          adds a trigger for this Animation
 YuiAnimation addTriggerOnValue(org.apache.wicket.Component component, org.apache.wicket.markup.html.form.FormComponent<?> element, String value)
          adds a component which will be a trigger
 void bind(org.apache.wicket.Component component)
           
 org.apache.wicket.Component getComponent()
           
 String getComponentId()
          the componet's markup id
 List<YuiAnimEffect> getEffects()
          the list of Effects
 List<org.wicketstuff.yui.behavior.animation.YuiAnimation.AnimValueGroup> getTriggers()
           
 boolean isTriggeredByAttachedComponent()
           
 void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
           
 void setComponent(org.apache.wicket.Component component)
           
 void setEffects(List<YuiAnimEffect> effects)
           
 void setOnEvent(OnEvent onEvent)
           
 void setTriggeredByAttachedComponent(boolean isTriggeredByAttachedComponent)
           
 void setTriggers(List<org.wicketstuff.yui.behavior.animation.YuiAnimation.AnimValueGroup> triggers)
           
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, cleanup, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onException, onRendered, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YuiAnimation

public YuiAnimation(OnEvent onEvent)
Constructor for an Animation that will be triggered when the 'event' occurs on the attached Component.

Parameters:
onEvent -

YuiAnimation

public YuiAnimation(OnEvent onEvent,
                    String triggerId)
Constructor for an Animation that will be triggered by the triggerId.

Parameters:
onEvent -
triggerId -

YuiAnimation

public YuiAnimation(OnEvent onEvent,
                    org.apache.wicket.Component component)
Constructor for an Anmation that will be triggered by the component

Parameters:
onEvent -
component -

YuiAnimation

public YuiAnimation(OnEvent onEvent,
                    org.apache.wicket.Component component,
                    org.apache.wicket.markup.html.form.FormComponent<?> element,
                    String value)
Parameters:
onEvent -
component -
element -
unselectValue -
Method Detail

bind

public void bind(org.apache.wicket.Component component)
Specified by:
bind in interface org.apache.wicket.behavior.IBehavior
Overrides:
bind in class org.apache.wicket.behavior.AbstractBehavior

renderHead

public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
Specified by:
renderHead in interface org.apache.wicket.markup.html.IHeaderContributor
Overrides:
renderHead in class org.apache.wicket.behavior.AbstractBehavior

getComponentId

public String getComponentId()
the componet's markup id

Returns:

getEffects

public List<YuiAnimEffect> getEffects()
the list of Effects

Returns:

setEffects

public void setEffects(List<YuiAnimEffect> effects)

getTriggers

public List<org.wicketstuff.yui.behavior.animation.YuiAnimation.AnimValueGroup> getTriggers()

setTriggers

public void setTriggers(List<org.wicketstuff.yui.behavior.animation.YuiAnimation.AnimValueGroup> triggers)

isTriggeredByAttachedComponent

public boolean isTriggeredByAttachedComponent()

setTriggeredByAttachedComponent

public void setTriggeredByAttachedComponent(boolean isTriggeredByAttachedComponent)

getComponent

public org.apache.wicket.Component getComponent()

setComponent

public void setComponent(org.apache.wicket.Component component)

setOnEvent

public void setOnEvent(OnEvent onEvent)

addEffect

public YuiAnimation addEffect(YuiAnimEffect effect)
adds an Anim Effect to the list of Effects that will be batched up and run one after another.

Parameters:
effect -
Returns:

addTrigger

public YuiAnimation addTrigger(String triggerId)
adds a trigger for this Animation

Parameters:
triggerId -

addTrigger

public YuiAnimation addTrigger(org.apache.wicket.Component component)
adds a component which will be a trigger

Parameters:
component -
Returns:

addTriggerOnValue

public YuiAnimation addTriggerOnValue(org.apache.wicket.Component component,
                                      org.apache.wicket.markup.html.form.FormComponent<?> element,
                                      String value)
adds a component which will be a trigger

Parameters:
component -
value -
element -
Returns:


Copyright © 2006-2012 Wicket developers. All Rights Reserved.