org.cruxframework.crux.core.client.css.animation
Class Animation<T extends com.google.gwt.resources.client.CssResource>

java.lang.Object
  extended by org.cruxframework.crux.core.client.css.animation.Animation<T>
Direct Known Subclasses:
StandardAnimation

public abstract class Animation<T extends com.google.gwt.resources.client.CssResource>
extends Object

Base class to create animations on top of CSS3 animations.

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
static interface Animation.Callback
          Callback used to monitor when the animation is completed
 
Constructor Summary
Animation()
          Constructor
 
Method Summary
 void animate(com.google.gwt.dom.client.Element el)
          Run the animation on the given element
 void animate(com.google.gwt.dom.client.Element el, Animation.Callback callback)
          Run the animation on the given element
 void animate(com.google.gwt.user.client.ui.Widget widget)
          Run the animation on the given widget
 void animate(com.google.gwt.user.client.ui.Widget widget, Animation.Callback callback)
          Run the animation on the given widget
protected  String getAnimationCssTrigger()
          Retrieve the name of the css class used to trigger the animation
protected abstract  String getAnimationName()
          Retrieve the name of the css animation rule used to animate the element
protected abstract  T getCssResource()
          Retrieve the CssResource that declare the animation rules used by this animation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animation

public Animation()
Constructor

Method Detail

animate

public void animate(com.google.gwt.user.client.ui.Widget widget)
Run the animation on the given widget

Parameters:
widget - to be animated

animate

public void animate(com.google.gwt.dom.client.Element el)
Run the animation on the given element

Parameters:
el - to be animated

animate

public void animate(com.google.gwt.user.client.ui.Widget widget,
                    Animation.Callback callback)
Run the animation on the given widget

Parameters:
widget - to be animated
callback - called when animation is completed

animate

public void animate(com.google.gwt.dom.client.Element el,
                    Animation.Callback callback)
Run the animation on the given element

Parameters:
el - to be animated
callback - called when animation is completed

getAnimationCssTrigger

protected String getAnimationCssTrigger()
Retrieve the name of the css class used to trigger the animation

Returns:

getAnimationName

protected abstract String getAnimationName()
Retrieve the name of the css animation rule used to animate the element

Returns:

getCssResource

protected abstract T getCssResource()
Retrieve the CssResource that declare the animation rules used by this animation.

Returns:


Copyright © 2014. All rights reserved.