public class BezierTransition extends TransitionAnimationBinding
Constructor and Description |
---|
BezierTransition(PropertyAnimation xProperty,
PropertyAnimation yProperty,
float controlX,
float controlY)
Creates a quadratic Bezier transition.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(AnimationBindingListener animationBindingListener)
Adds a
AnimationBindingListener . |
void |
collectTransitioningProperties(java.util.ArrayList<PropertyAnimation> outList)
Collects the set of
PropertyAnimation s that this animation will animate. |
java.lang.Object |
getTag()
Allows adding a tags that can also be used to store data without resorting to another data
structure.
|
void |
removeListener(AnimationBindingListener animationBindingListener)
Removes a previously added
AnimationBindingListener . |
void |
setTag(java.lang.Object tag) |
protected void |
setupBinding(Resolver resolver)
Subclasses should set up their animation by creating a graph that defines how data will flow to
relevant
AnimatedPropertyNode s. |
addBinding, addBinding, isActive, prepareToStartLater, start, stop
public BezierTransition(PropertyAnimation xProperty, PropertyAnimation yProperty, float controlX, float controlY)
Specifically, controlPointX=0 will give the control point the x position of initial position of the curve. controlPointX=1 will give the control point the x position of the end of the curve. controlPointX=.5 will give it the x position midway between the start and end x positions. Increasing the value beyond 1 or below 0 will move the control point beyond the end x position or before the start x position, respectively, while values between 0 and 1 will place the point in between the start and end x positions.
All of the above also applies to the controlPointY value as well.
For good looking curves, you want to make sure controlPointX != controlPointY (or else the curve won't curve since it lies on the straight line between the start and end points).
public void collectTransitioningProperties(java.util.ArrayList<PropertyAnimation> outList)
AnimationBinding
PropertyAnimation
s that this animation will animate. This is used
to make sure before/after values are recorded and accessible for the animation. Implementations
should add their animating properties to this set.
Note: This is a 'collect' call instead of a getter to allocating more sets then necessary for animations with nested animation (e.g. a sequence of animations). Yay Java.
protected void setupBinding(Resolver resolver)
TransitionAnimationBinding
AnimatedPropertyNode
s.setupBinding
in class TransitionAnimationBinding
public final void addListener(AnimationBindingListener animationBindingListener)
AnimationBinding
AnimationBindingListener
.addListener
in interface AnimationBinding
public final void removeListener(AnimationBindingListener animationBindingListener)
AnimationBinding
AnimationBindingListener
.removeListener
in interface AnimationBinding
public java.lang.Object getTag()
AnimationBinding
getTag
in interface AnimationBinding
public void setTag(java.lang.Object tag)
setTag
in interface AnimationBinding