Motivation Animation is Cool Can Allow for Illustrations of Certain Concepts Without it Computers Would be a lot More Boring Definition of animation Picturesframes are displayed in sequence Frames are displayed several times per second ID: 590113
Download Presentation The PPT/PDF document "Tim Anderson, Daniel Lehman, Cort Pugh, ..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Tim Anderson, Daniel Lehman, Cort Pugh, Alia RobinsonSlide2
Motivation
Animation is Cool
Can Allow for Illustrations of Certain Concepts
Without it Computers Would be a lot More BoringSlide3
Definition of animation
Pictures/frames are displayed in sequence
Frames are displayed several times per secondSlide4
Animation Basics
T
he Animation Loop
U
pdate
,
Render
,
Sleep
S
tarting
and
Terminating
an
Animation
Pausing and
Resuming
D
ouble Buffering
Management
of
Inaccuracies
in the
Timer
and
Sleep OperationsSlide5
Implementations
Timers
ThreadsSlide6
Timers
javax.swing.Timer
versus
java.util.Timer
Timer calls
actionPerformed
at predetermined intervals to create animationSlide7
Threads
Animating Thread
and GUI Event Processing Thread
Possible Synchronization Issues
Thread Safety
Thread.sleep
() Allows for Updates and ViewsSlide8
Animation In General
Flash or Silverlight
Scripting LanguagesSlide9
Sources
Big Java
http
://
docs.oracle.com/javase/tutorial/uiswing/misc/timer.html
http
://fivedots.coe.psu.ac.th/~ad/jg/ch1/index.html