- Type Parameters:
IMG
- The image type to be used for theFlipBookBuilder
.
- All Superinterfaces:
org.refcodes.component.Ceasable
,org.refcodes.component.Ceasable.UncheckedCeasable
,org.refcodes.component.Destroyable
,org.refcodes.component.Initializable
,org.refcodes.component.Initializable.UncheckedInitializable
,org.refcodes.component.LifecycleComponent
,org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponent
,org.refcodes.component.Pausable
,org.refcodes.component.Pausable.UncheckedPausable
,org.refcodes.component.Resumable
,org.refcodes.component.Resumable.UncheckedResumable
,org.refcodes.component.Startable
,org.refcodes.component.Startable.UncheckedStartable
,org.refcodes.component.Stoppable
,org.refcodes.component.Stoppable.UncheckedStoppable
public interface FlipBookBuilder<IMG>
extends org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponent, org.refcodes.component.Ceasable.UncheckedCeasable
A
FlipBookBuilder
defines a sequence of images (animation) to be
flipped through (as of an old fashioned flip-book). The
FlipBookBuilder
supports different phases initiated by the according
life-cycle phases: INITIALIZE THE SEQUENCE: Initializable.initialize()
: Reset the
FlipBookBuilder
to start the animation over again with the start-up
sequence. The start-up sequence is displayed just once to commence the
main-loop sequence. Note: The FlipBookBuilder
animation is not yet
started, just prepared to begin with the start-up sequence! START THE
SEQUENCE: Startable.start()
: Starts the FlipBookBuilder
animation. In
case there is a start-up sequence, that sequence is flipped through till the
end followed by the main-loop sequence which is being repeated until
instructed differently (via Stoppable.stop()
, Pausable.pause()
or
Destroyable.destroy()
). PAUSE THE SEQUENCE: Pausable.pause()
: Pauses the
animation just where it is currently (to be resumed later with
Resumable.resume()
). RESUME THE SEQUENCE: Resumable.resume()
: Resumes a paused
(Pausable.pause()
) the animation to continue just where it has been paused.
STOP THE SEQUENCE: Stoppable.stop()
: Stops the animation sequence at the
beginning of the main-loop. The animation continues till the beginning main
loop reached its sequence's end, then it stops. CEASE THE SEQUENCE:
Ceasable.UncheckedCeasable.cease()
: In case you want to fade out your sequence or let it end
with an explosion, you may invoke the Ceasable.UncheckedCeasable.cease()
method. The animation
should be initialized (Initializable.initialize()
) in order to begin with the
start-up sequence again.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.component.Ceasable
org.refcodes.component.Ceasable.CeaseAutomaton, org.refcodes.component.Ceasable.CeaseBuilder<B extends org.refcodes.component.Ceasable.CeaseBuilder<B>>, org.refcodes.component.Ceasable.UncheckedCeasable
Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomaton
Nested classes/interfaces inherited from interface org.refcodes.component.Initializable
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable
Nested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent
org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponent
Nested classes/interfaces inherited from interface org.refcodes.component.Pausable
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable
Nested classes/interfaces inherited from interface org.refcodes.component.Resumable
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumable
Nested classes/interfaces inherited from interface org.refcodes.component.Startable
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable
Nested classes/interfaces inherited from interface org.refcodes.component.Stoppable
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCeaseImage
(IMG aImage) Adds an image to the cease sequence.default void
addCeaseSequence
(IMG... aImages) Adds a sequence of images to the cease sequence.void
addMainLoopImage
(IMG aImage) Adds an image to the main-loop sequence.default void
addMainLoopSequence
(IMG... aImages) Adds a sequence of images to the main-loop sequence.void
addStartUpImage
(IMG aImage) Adds an image to the start-up sequence.default void
addStartUpSequence
(IMG... aImages) Adds a sequence of images to the start-up sequence.int
Gets the duration of a single image to be displayed until the next image is shown.int
Gets the start-up delay of the animation before it is started.void
setImageDurationInMs
(int aDurationInMs) Sets the duration of a single image to be displayed until the next image is shown.void
setStartUpDelayInMs
(int aStartUpDelayInMs) Sets the start-up delay of the animation before it is started.default FlipBookBuilder<IMG>
withAddCeaseImage
(IMG aImage) Adds an image to the cease sequence.default FlipBookBuilder<IMG>
withAddCeaseSequence
(IMG... aImages) Adds a sequence of images to the cease sequence.default FlipBookBuilder<IMG>
withAddMainLoopImage
(IMG aImage) Adds an image to the main-loop sequence.default FlipBookBuilder<IMG>
withAddMainLoopSequence
(IMG... aImages) Adds a sequence of images to the main-loop sequence.default FlipBookBuilder<IMG>
withAddStartUpImage
(IMG aImage) Adds an image to the start-up sequence.default FlipBookBuilder<IMG>
withAddStartUpSequence
(IMG... aImages) Adds a sequence of images to the start-up sequence.default FlipBookBuilder<IMG>
withImageDurationInMs
(int aDurationInMs) Sets the duration of a single image to be displayed until the next image is shown.default FlipBookBuilder<IMG>
withStartUpDelayInMs
(int aStartUpDelayInMs) Sets the start-up delay of the animation before it is started.Methods inherited from interface org.refcodes.component.Ceasable
ceaseUnchecked
Methods inherited from interface org.refcodes.component.Ceasable.UncheckedCeasable
cease
Methods inherited from interface org.refcodes.component.Destroyable
destroy
Methods inherited from interface org.refcodes.component.Initializable
initializeUnchecked
Methods inherited from interface org.refcodes.component.Initializable.UncheckedInitializable
initialize
Methods inherited from interface org.refcodes.component.Pausable
pauseUnchecked
Methods inherited from interface org.refcodes.component.Pausable.UncheckedPausable
pause
Methods inherited from interface org.refcodes.component.Resumable
resumeUnchecked
Methods inherited from interface org.refcodes.component.Resumable.UncheckedResumable
resume
Methods inherited from interface org.refcodes.component.Startable
startUnchecked
Methods inherited from interface org.refcodes.component.Startable.UncheckedStartable
start
Methods inherited from interface org.refcodes.component.Stoppable
stopUnchecked
Methods inherited from interface org.refcodes.component.Stoppable.UncheckedStoppable
stop
-
Method Details
-
addStartUpImage
Adds an image to the start-up sequence.- Parameters:
aImage
- The image to be added to the end of the start-up sequence.
-
withAddStartUpImage
Adds an image to the start-up sequence.- Parameters:
aImage
- The image to be added to the end of the start-up sequence.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-
addStartUpSequence
Adds a sequence of images to the start-up sequence.- Parameters:
aImages
- The images to be added to the end of the start-up sequence.
-
withAddStartUpSequence
Adds a sequence of images to the start-up sequence.- Parameters:
aImages
- The images to be added to the end of the start-up sequence.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-
addMainLoopImage
Adds an image to the main-loop sequence.- Parameters:
aImage
- The image to be added to the end of the main-loop sequence.
-
withAddMainLoopImage
Adds an image to the main-loop sequence.- Parameters:
aImage
- The image to be added to the end of the main-loop sequence.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-
addMainLoopSequence
Adds a sequence of images to the main-loop sequence.- Parameters:
aImages
- The images to be added to the end of the main-loop sequence.
-
withAddMainLoopSequence
Adds a sequence of images to the main-loop sequence.- Parameters:
aImages
- The images to be added to the end of the main-loop sequence.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-
addCeaseImage
Adds an image to the cease sequence.- Parameters:
aImage
- The image to be added to the end of the cease sequence.
-
withAddCeaseImage
Adds an image to the cease sequence.- Parameters:
aImage
- The image to be added to the end of the cease sequence.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-
addCeaseSequence
Adds a sequence of images to the cease sequence.- Parameters:
aImages
- The images to be added to the end of the cease sequence.
-
withAddCeaseSequence
Adds a sequence of images to the cease sequence.- Parameters:
aImages
- The images to be added to the end of the cease sequence.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-
setImageDurationInMs
void setImageDurationInMs(int aDurationInMs) Sets the duration of a single image to be displayed until the next image is shown.- Parameters:
aDurationInMs
- The duration in milliseconds.
-
getImageDurationInMs
int getImageDurationInMs()Gets the duration of a single image to be displayed until the next image is shown.- Returns:
- The duration in milliseconds.
-
withImageDurationInMs
Sets the duration of a single image to be displayed until the next image is shown.- Parameters:
aDurationInMs
- The duration in milliseconds.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-
setStartUpDelayInMs
void setStartUpDelayInMs(int aStartUpDelayInMs) Sets the start-up delay of the animation before it is started.- Parameters:
aStartUpDelayInMs
- The start-up delay in milliseconds.
-
getStartUpDelayInMs
int getStartUpDelayInMs()Gets the start-up delay of the animation before it is started.- Returns:
- The start-up delay in milliseconds.
-
withStartUpDelayInMs
Sets the start-up delay of the animation before it is started.- Parameters:
aStartUpDelayInMs
- The start-up delay in milliseconds.- Returns:
- The
FlipBookBuilder
as of the Builder-Pattern.
-