Package org.opencms.gwt.client.util
Class CmsSlideAnimation
java.lang.Object
com.google.gwt.animation.client.Animation
org.opencms.gwt.client.util.A_CmsAnimation
org.opencms.gwt.client.util.CmsSlideAnimation
Slide animation. Sliding the element into view or sliding it out.
Uses the in-line CSS display property, clear after completion if appropriate.
- Since:
- 8.0.0
-
Field Summary
Fields inherited from class org.opencms.gwt.client.util.A_CmsAnimation
m_callback -
Constructor Summary
ConstructorsConstructorDescriptionCmsSlideAnimation(com.google.gwt.dom.client.Element element, boolean show, com.google.gwt.user.client.Command callback) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidonUpdate(double progress) voidrun(int duration, double startTime) static CmsSlideAnimationslideIn(com.google.gwt.dom.client.Element element, com.google.gwt.user.client.Command callback, int duration) Slides the given element into view executing the callback afterwards.static CmsSlideAnimationslideOut(com.google.gwt.dom.client.Element element, com.google.gwt.user.client.Command callback, int duration) Slides the given element out of view executing the callback afterwards.Methods inherited from class com.google.gwt.animation.client.Animation
cancel, interpolate, isRunning, onCancel, onStart, run, run, run
-
Constructor Details
-
CmsSlideAnimation
public CmsSlideAnimation(com.google.gwt.dom.client.Element element, boolean show, com.google.gwt.user.client.Command callback) Constructor.- Parameters:
element- the element to animateshow-trueto show the element,falseto hide it awaycallback- the callback executed after the animation is completed
-
-
Method Details
-
slideIn
public static CmsSlideAnimation slideIn(com.google.gwt.dom.client.Element element, com.google.gwt.user.client.Command callback, int duration) Slides the given element into view executing the callback afterwards.- Parameters:
element- the element to slide incallback- the callbackduration- the animation duration- Returns:
- the running animation object
-
slideOut
public static CmsSlideAnimation slideOut(com.google.gwt.dom.client.Element element, com.google.gwt.user.client.Command callback, int duration) Slides the given element out of view executing the callback afterwards.- Parameters:
element- the element to slide outcallback- the callbackduration- the animation duration- Returns:
- the running animation object
-
run
- Overrides:
runin classcom.google.gwt.animation.client.Animation- See Also:
-
onComplete
- Overrides:
onCompletein classA_CmsAnimation- See Also:
-
onUpdate
- Specified by:
onUpdatein classcom.google.gwt.animation.client.Animation- See Also:
-