-
public final class ScaleAnimation<T extends ComponentView> extends ComponentAnimation<T>
A scale Animation.
Sca,les given ComponentView to given scalar.
-
-
Field Summary
Fields Modifier and Type Field Description private final Double
fromScaleX
private final Double
toScaleX
private final Double
fromScaleY
private final Double
toScaleY
private final T
componentView
private Boolean
running
private Function1<AnimationFinishedEvent, Unit>
onFinished
private final Integer
duration
-
Constructor Summary
Constructors Constructor Description ScaleAnimation(T componentView, Number byScaleX, Number byScaleY, Integer duration)
A scale animation. ScaleAnimation(T componentView, Number byScale, Integer duration)
A scale animation. ScaleAnimation(T componentView, Number fromScaleX, Number toScaleX, Number fromScaleY, Number toScaleY, Integer duration)
Creates a ScaleAnimation for the given ComponentView.
-
Method Summary
Modifier and Type Method Description final Double
getFromScaleX()
Initial X scale. final Double
getToScaleX()
Resulting X scale. final Double
getFromScaleY()
Initial Y scale. final Double
getToScaleY()
Resulting Y scale. final T
getComponentView()
final Boolean
getRunning()
Boolean indicating whether the Animation is currently running. final Unit
setRunning(Boolean running)
Boolean indicating whether the Animation is currently running. final Function1<AnimationFinishedEvent, Unit>
getOnFinished()
Gets invoked when Animation has finished. final Unit
setOnFinished(Function1<AnimationFinishedEvent, Unit> onFinished)
Gets invoked when Animation has finished. final Integer
getDuration()
-
-
Constructor Detail
-
ScaleAnimation
ScaleAnimation(T componentView, Number byScaleX, Number byScaleY, Integer duration)
A scale animation.- Parameters:
componentView
- ComponentView to animatebyScaleX
- Relative X scale.byScaleY
- Relative Y scale.duration
- Animation duration in milliseconds.
-
ScaleAnimation
ScaleAnimation(T componentView, Number byScale, Integer duration)
A scale animation.- Parameters:
componentView
- ComponentView to animatebyScale
- Relative scale.duration
- Animation duration in milliseconds.
-
ScaleAnimation
ScaleAnimation(T componentView, Number fromScaleX, Number toScaleX, Number fromScaleY, Number toScaleY, Integer duration)
Creates a ScaleAnimation for the given ComponentView.- Parameters:
componentView
- ComponentView to animatefromScaleX
- Initial X position.toScaleX
- Resulting X position.fromScaleY
- Initial Y position.toScaleY
- Resulting Y position.duration
- Duration in milliseconds.
-
-
Method Detail
-
getFromScaleX
final Double getFromScaleX()
Initial X scale.
-
getToScaleX
final Double getToScaleX()
Resulting X scale.
-
getFromScaleY
final Double getFromScaleY()
Initial Y scale.
-
getToScaleY
final Double getToScaleY()
Resulting Y scale.
-
getComponentView
final T getComponentView()
-
getRunning
final Boolean getRunning()
-
setRunning
final Unit setRunning(Boolean running)
-
getOnFinished
final Function1<AnimationFinishedEvent, Unit> getOnFinished()
Gets invoked when Animation has finished.
-
setOnFinished
final Unit setOnFinished(Function1<AnimationFinishedEvent, Unit> onFinished)
Gets invoked when Animation has finished.
-
getDuration
final Integer getDuration()
-
-
-
-