package com.ericsson.tic.vi; import java.util.TimerTask; import java.util.Timer; /** * Schedules calls to the Animator at regular intervalls. * * @author Sami Matilainen * @version 1.0 (2008-12-04) */ public class AnimatorTimer extends TimerTask { /** The Animator which this timer is tasked to call. */ private Animator animator; /** * Creates an AnimatorTimer. * * @param animator The Animator. */ public AnimatorTimer(Animator animator) { this.animator = animator; Timer t = new Timer(true); t.schedule(this, 25, 25); } /** * Schedules calls to the Animator at regular intervalls. */ public void run() { animator.display(); } }