app.spa
Class SPAPlayerEventHandler

java.lang.Object
  extended by app.spa.SPAPlayerEventHandler
All Implemented Interfaces:
player.JALoadingPlayerEventHandler, player.JAPlayerEventHandler

public class SPAPlayerEventHandler
extends java.lang.Object
implements player.JALoadingPlayerEventHandler

Loading player event handler: receives notification of SiGML loading and animation events from the SiGML Player Applet's JA player component, converting them into SPAEvents which it posts (typically to the SPA event dispatcher thread) via an event target supplied at construction time.


Constructor Summary
SPAPlayerEventHandler(SPAEventTarget etarget)
          Constructs a new loading player event handler, which will direct the events it generates to the given target.
 
Method Summary
 void loaderHasStarted()
          Handles a loader started event, posting a corresponding event to this handler's target, and checking the resulting acknowledgement.
 void loaderIsDone(boolean gotanim, int nsigns, int nframes)
          Handles an animation load done event, with the given success flag and sign- and frame-counts.
 void nextSignLoaded(int s, int flimit)
          Handles a next sign (in animation) loaded event, with the given sign index and frame index limit values.
 void playerIsAtNewFrame(player.AnimationScan scan, boolean dropped)
          Handles a player at new frame event, with the associated scanner, and frame dropped flag.
 void playerIsDone(player.AnimationScan scan)
          Handles a player done event, with the associated scanner.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPAPlayerEventHandler

public SPAPlayerEventHandler(SPAEventTarget etarget)
Constructs a new loading player event handler, which will direct the events it generates to the given target.

Method Detail

loaderHasStarted

public void loaderHasStarted()
Handles a loader started event, posting a corresponding event to this handler's target, and checking the resulting acknowledgement.

Specified by:
loaderHasStarted in interface player.JALoadingPlayerEventHandler

nextSignLoaded

public void nextSignLoaded(int s,
                           int flimit)
Handles a next sign (in animation) loaded event, with the given sign index and frame index limit values. Posts a loaded-next-sign event to this handler's target and checks the resulting acknowledgement.

Specified by:
nextSignLoaded in interface player.JALoadingPlayerEventHandler

loaderIsDone

public void loaderIsDone(boolean gotanim,
                         int nsigns,
                         int nframes)
Handles an animation load done event, with the given success flag and sign- and frame-counts. Posts a load-frames-done-bad/ok event to this handler's target and checks the resulting acknowledgement.

Specified by:
loaderIsDone in interface player.JALoadingPlayerEventHandler

playerIsAtNewFrame

public void playerIsAtNewFrame(player.AnimationScan scan,
                               boolean dropped)
Handles a player at new frame event, with the associated scanner, and frame dropped flag. Posts a play-done event to this handler's target and checks the resulting acknowledgement.

Specified by:
playerIsAtNewFrame in interface player.JAPlayerEventHandler

playerIsDone

public void playerIsDone(player.AnimationScan scan)
Handles a player done event, with the associated scanner. Posts a play-done event to this handler's target and checks the resulting acknowledgement.

Specified by:
playerIsDone in interface player.JAPlayerEventHandler