public class

StrokedShape.Animator

extends Shape.Animator<AnimatorType extends Animator<AnimatorType>>
java.lang.Object
   ↳ sofia.graphics.Shape.Animator<AnimatorType extends sofia.graphics.Shape.Animator<AnimatorType>>
     ↳ sofia.graphics.StrokedShape.Animator<AnimatorType extends sofia.graphics.StrokedShape.Animator<AnimatorType>>
Known Direct Subclasses

Class Overview

Provides animation support for shapes. Most uses of this class will not need to reference it directly; for example, an animation can be constructed and played by chaining method calls directly:

     shape.animate(500).color(Color.BLUE).alpha(128).play();
In situations where the type of the class must be referenced directly (for example, when one is passed to an event handler like onAnimationDone), referring to the name of that type can be somewhat awkward due to the use of some Java generics tricks to ensure that the methods chain properly. In nearly all cases, it is reasonable to use a "?" wildcard in place of the generic parameter:
     Shape.Animator<?> anim = shape.animate(500).color(Color.BLUE);
     anim.play();

Summary

Protected Constructors
StrokedShape.Animator(long duration)
Creates a new animator for the specified shape.
Public Methods
StrokedShape getShape()
Gets the shape that the receiver is animating.
AnimatorType strokeWidth(double strokeWidth)
Sets the final stroke width of the shape when the animation ends.
[Expand]
Inherited Methods
From class sofia.graphics.Shape.Animator
From class java.lang.Object

Protected Constructors

protected StrokedShape.Animator (long duration)

Creates a new animator for the specified shape. Users cannot call call this constructor directly; instead, they need to use the StrokedShape#animate(long) method to get an animator object.

Parameters
duration the length of one pass of the animation, in milliseconds

Public Methods

public StrokedShape getShape ()

Gets the shape that the receiver is animating.

Returns
  • the shape that the receiver is animating

public AnimatorType strokeWidth (double strokeWidth)

Sets the final stroke width of the shape when the animation ends.

Parameters
strokeWidth the final stroke width of the shape when the animation ends
Returns
  • this animator, for method chaining