object Animation
This companion object of class Animation provides a couple of convenience methods (show, generate) for starting animations and an enumeration (AtEnd) for use with the class.
- Alphabetic
- By Inheritance
- Animation
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed abstract class AtEnd extends Product with Serializable
The objects that inherit this “enumeration class” each specify a different policy for handling what happens once an Animation reaches the last frame.
The objects that inherit this “enumeration class” each specify a different policy for handling what happens once an Animation reaches the last frame.
- See also
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def generate(makeFrame: (Int) => Pic, numberOfFrames: Int = Int.MaxValue, frameRate: Double = 5, terminateOnClose: Boolean = false, atEnd: AtEnd = LeaveLastFrameVisible): Animation
Uses a given function to generate an animation, then starts and returns that animation.
Uses a given function to generate an animation, then starts and returns that animation.
- makeFrame
a function that generates the frames of the animation: it takes a frame number (>= 0) and returns the corresponding Pic
- numberOfFrames
the number of frames in the animation; the numbers
0 <= n < numberOfFrames
get passed tomakeFrame
to generate the animation- frameRate
a target speed (in Pics per second), which the
Animation
will roughly observe if possible- terminateOnClose
whether the entire application should exit when the animation window is closed
- atEnd
what should happen once the animation reaches the final Pic
- returns
the running animation
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def show(frames: Iterable[Pic], frameRate: Double = 5, terminateOnClose: Boolean = false, atEnd: AtEnd = LeaveLastFrameVisible): Animation
Creates and immediately starts an Animation as specified by the parameters.
Creates and immediately starts an Animation as specified by the parameters.
- frames
the Pics that the animation consists of, in order; they should be identical in size
- frameRate
a target speed (in Pics per second), which the
Animation
will roughly observe if possible- terminateOnClose
whether the entire application should exit when the animation window is closed
- atEnd
what should happen once the animation reaches the final Pic
- returns
the running animation
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object Close extends AtEnd with Product with Serializable
Used as an Animation parameter to signal that the animation window should automatically close after the last frame.
- object LeaveLastFrameVisible extends AtEnd with Product with Serializable
Used as an Animation parameter to signal that the animation should stay stopped but visible at the last frame once it’s done.
- object Loop extends AtEnd with Product with Serializable
Used as an Animation parameter to signal that the animation should repeat ad infinitum.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.