01: package net.refractions.udig.project.ui;
02:
03: import net.refractions.udig.project.ui.commands.IDrawCommand;
04:
05: import org.eclipse.core.runtime.IProgressMonitor;
06:
07: /**
08: * This Commands manages the timing of a short animation being drawn on the ViewportPane.
09: *
10: * @author jeichar
11: */
12: public interface IAnimation extends IDrawCommand {
13:
14: /**
15: * Gets time the interval between the frames in milliseconds.
16: * <p>
17: * The time cannot be smaller than 100 milliseconds
18: * </p>
19: *
20: * @return time the interval between the frames in milliseconds.
21: */
22: short getFrameInterval();
23:
24: /**
25: * Increments the current frame. The next time run is called the frame should be drawn
26: */
27: void nextFrame();
28:
29: /**
30: * Returns true if the animation has more frames to display.
31: *
32: * @return true if the animation has more frames to display.
33: */
34: boolean hasNext();
35:
36: /**
37: * This method draws the current frame <b>and</b> fires a FRAME event
38: */
39: public void run(IProgressMonitor monitor) throws Exception;
40: }
|