public class MaterialPathAnimator extends Object implements gwt.material.design.client.base.HasDurationTransition
// CAN BE CALLED AS A HELPER STATIC CONTEXT
MaterialPathAnimator.animate(Element source, Element target, Functions.Func animateCallback);
// INSTANTIATE THE PUSHPIN COMPONENT
MaterialPathAnimator animator = new MaterialPathAnimator();
animator.setSourceElement(btnSource1.getElement());
animator.setTargetElement(panelTarget1.getElement());
animator.animate();
// Reverse Animate
animator.reverseAnimate();
Constructor and Description |
---|
MaterialPathAnimator() |
MaterialPathAnimator(com.google.gwt.dom.client.Element sourceElement,
com.google.gwt.dom.client.Element targetElement) |
Modifier and Type | Method and Description |
---|---|
void |
animate()
Animate the path animator
|
static void |
animate(com.google.gwt.dom.client.Element source,
com.google.gwt.dom.client.Element target)
Helper method to apply the path animator.
|
static void |
animate(com.google.gwt.dom.client.Element sourceElement,
com.google.gwt.dom.client.Element targetElement,
gwt.material.design.jquery.client.api.Functions.Func animateCallback)
Helper method to apply the path animator with callback.
|
static void |
animate(com.google.gwt.user.client.ui.Widget source,
com.google.gwt.user.client.ui.Widget target)
Helper method to apply the path animator.
|
static void |
animate(com.google.gwt.user.client.ui.Widget source,
com.google.gwt.user.client.ui.Widget target,
gwt.material.design.jquery.client.api.Functions.Func callback)
Helper method to apply the path animator with callback.
|
gwt.material.design.jquery.client.api.Functions.Func |
getAnimateCallback()
Get the callback method when the path animator is applied
|
int |
getDuration() |
int |
getExtraTransitionDuration() |
gwt.material.design.jquery.client.api.Functions.Func |
getReverseCallback()
Get the reverse callback method when the path animator is applied
|
com.google.gwt.dom.client.Element |
getSourceElement()
Get the source element
|
com.google.gwt.dom.client.Element |
getTargetElement()
Get the target element
|
int |
getTargetShowDuration() |
boolean |
isRelativeToWindow() |
void |
reverseAnimate()
Reverse the Animation
|
static void |
reverseAnimate(com.google.gwt.dom.client.Element sourceElement,
com.google.gwt.dom.client.Element targetElement)
Helper method to reverse animate the source element to target element.
|
static void |
reverseAnimate(com.google.gwt.dom.client.Element sourceElement,
com.google.gwt.dom.client.Element targetElement,
gwt.material.design.jquery.client.api.Functions.Func reverseCallback)
Helper method to reverse animate the source element to target element with reverse callback
|
static void |
reverseAnimate(com.google.gwt.user.client.ui.Widget source,
com.google.gwt.user.client.ui.Widget target)
Helper method to reverse animate the source element to target element.
|
static void |
reverseAnimate(com.google.gwt.user.client.ui.Widget source,
com.google.gwt.user.client.ui.Widget target,
gwt.material.design.jquery.client.api.Functions.Func reverseCallback)
Helper method to reverse animate the source element to target element with reverse callback.
|
void |
setAnimateCallback(gwt.material.design.jquery.client.api.Functions.Func animateCallback)
Set the callback method when the path animator is applied
|
void |
setDuration(int duration) |
void |
setExtraTransitionDuration(int extraTransitionDuration)
Extra duration (in milliseconds) of targetElement to provide visual continuity between the animation and the rendering of the targetElement.
|
void |
setRelativeToWindow(boolean relativeToWindow)
Set to true if your target element is fixed positioned in the window.
|
void |
setReverseCallback(gwt.material.design.jquery.client.api.Functions.Func reverseCallback)
Set the reverse callback method when the path animator is applied
|
void |
setSourceElement(com.google.gwt.dom.client.Element sourceElement)
Set the source element
|
void |
setTargetElement(com.google.gwt.dom.client.Element targetElement)
Set the target element
|
void |
setTargetShowDuration(int targetShowDuration)
Duration (in milliseconds) of targetElement to become visible, if hidden initially.
|
public MaterialPathAnimator()
public MaterialPathAnimator(com.google.gwt.dom.client.Element sourceElement, com.google.gwt.dom.client.Element targetElement)
public void animate()
public static void animate(com.google.gwt.dom.client.Element source, com.google.gwt.dom.client.Element target)
source
- Source element to apply the Path Animatortarget
- Target element to apply the Path Animatorpublic static void animate(com.google.gwt.user.client.ui.Widget source, com.google.gwt.user.client.ui.Widget target)
source
- Source widget to apply the Path Animatortarget
- Target widget to apply the Path Animatorpublic static void animate(com.google.gwt.user.client.ui.Widget source, com.google.gwt.user.client.ui.Widget target, gwt.material.design.jquery.client.api.Functions.Func callback)
source
- Source widget to apply the Path Animatortarget
- Target widget to apply the Path Animatorcallback
- The callback method to be called when the path animator is appliedpublic static void animate(com.google.gwt.dom.client.Element sourceElement, com.google.gwt.dom.client.Element targetElement, gwt.material.design.jquery.client.api.Functions.Func animateCallback)
sourceElement
- Source widget to apply the Path AnimatortargetElement
- Target widget to apply the Path AnimatoranimateCallback
- The callback method to be called when the path animator is appliedpublic void reverseAnimate()
public static void reverseAnimate(com.google.gwt.dom.client.Element sourceElement, com.google.gwt.dom.client.Element targetElement)
sourceElement
- Source element to apply the Path AnimatortargetElement
- Target element to apply the Path Animatorpublic static void reverseAnimate(com.google.gwt.user.client.ui.Widget source, com.google.gwt.user.client.ui.Widget target)
source
- Source widget to apply the Path Animatortarget
- Target widget to apply the Path Animatorpublic static void reverseAnimate(com.google.gwt.user.client.ui.Widget source, com.google.gwt.user.client.ui.Widget target, gwt.material.design.jquery.client.api.Functions.Func reverseCallback)
source
- Source widget to apply the Path Animatortarget
- Target widget to apply the Path AnimatorreverseCallback
- The reverse callback method to be called when the path animator is appliedpublic static void reverseAnimate(com.google.gwt.dom.client.Element sourceElement, com.google.gwt.dom.client.Element targetElement, gwt.material.design.jquery.client.api.Functions.Func reverseCallback)
sourceElement
- Source element to apply the Path AnimatortargetElement
- Target element to apply the Path AnimatorreverseCallback
- The reverse callback method to be called when the path animator is appliedpublic com.google.gwt.dom.client.Element getSourceElement()
public void setSourceElement(com.google.gwt.dom.client.Element sourceElement)
public com.google.gwt.dom.client.Element getTargetElement()
public void setTargetElement(com.google.gwt.dom.client.Element targetElement)
public gwt.material.design.jquery.client.api.Functions.Func getAnimateCallback()
public void setAnimateCallback(gwt.material.design.jquery.client.api.Functions.Func animateCallback)
public gwt.material.design.jquery.client.api.Functions.Func getReverseCallback()
public void setReverseCallback(gwt.material.design.jquery.client.api.Functions.Func reverseCallback)
public void setDuration(int duration)
setDuration
in interface gwt.material.design.client.base.HasDurationTransition
public int getDuration()
getDuration
in interface gwt.material.design.client.base.HasDurationTransition
public void setTargetShowDuration(int targetShowDuration)
public int getTargetShowDuration()
public void setExtraTransitionDuration(int extraTransitionDuration)
public int getExtraTransitionDuration()
public boolean isRelativeToWindow()
public void setRelativeToWindow(boolean relativeToWindow)
Copyright © 2018. All rights reserved.