sigmlanim
Class SiGMLAnimation

java.lang.Object
  extended by sigmlanim.SiGMLAnimation
All Implemented Interfaces:
SiGMLAnimationBuildHandler

public class SiGMLAnimation
extends java.lang.Object
implements SiGMLAnimationBuildHandler

A description of a SiGML animation. This description usually consists of two components:

In some circumstances the animation may consist solely of the frames sequence without any associated signs.


Constructor Summary
SiGMLAnimation()
          Constructs a new animation which is initially empty and which is expected to be built dynamically via a suitable sequence of calls on this animation's SiGMLAnimationBuildHandler implementation.
SiGMLAnimation(AnimatedSign[] asigns)
          Constructs a new animation from the given sequence of signs, which are assumed already to have had animation frames attached to them: the animation's frame sequence is constructed from these individual sequences (before this constructor execution completes).
SiGMLAnimation(CASFrame[] frms)
          Constructs a new animation directly from the given sequence of frames, on the assumption that no associated sequence of signs is available.
SiGMLAnimation(SiGMLAnimationLoadEventHandler saleh)
          Constructs a new animation which is initially empty and which is expected to be built dynamically via a suitable sequence of calls on this animation's SiGMLAnimationBuildHandler implementation, reporting sign load events via the given handler.
 
Method Summary
 void beginSignSequence()
          Accepts notificatation that input of the sign sequence is starting.
 void endSignSequence()
          Accetps notification that no further signs are to be added to the sequence for this animation.
 CASFrame[] getFrames()
          Returns this animation's sequence of frames.
 SignsArrayAccess getSignsArray()
          Returns a signs-array-access implementatation for this animation.
 boolean hasSigns()
          Indicates whether signs data is available for this animation.
 void nextSignAnimationIsDone()
          Accepts notification that animation has now been generated for one more of this animation's signs.
 void setNextSign(AnimatedSign as)
          Accepts the given sign (not yet animated) as the next one in this animation.
 void waitForAnimationComplete()
          Delays the calling thread if necessary until this animation is complete.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiGMLAnimation

public SiGMLAnimation()
Constructs a new animation which is initially empty and which is expected to be built dynamically via a suitable sequence of calls on this animation's SiGMLAnimationBuildHandler implementation.


SiGMLAnimation

public SiGMLAnimation(SiGMLAnimationLoadEventHandler saleh)
Constructs a new animation which is initially empty and which is expected to be built dynamically via a suitable sequence of calls on this animation's SiGMLAnimationBuildHandler implementation, reporting sign load events via the given handler.


SiGMLAnimation

public SiGMLAnimation(AnimatedSign[] asigns)
Constructs a new animation from the given sequence of signs, which are assumed already to have had animation frames attached to them: the animation's frame sequence is constructed from these individual sequences (before this constructor execution completes). PRE-CONDITION: aSigns!=null.


SiGMLAnimation

public SiGMLAnimation(CASFrame[] frms)
Constructs a new animation directly from the given sequence of frames, on the assumption that no associated sequence of signs is available.

Method Detail

getSignsArray

public SignsArrayAccess getSignsArray()
Returns a signs-array-access implementatation for this animation.


hasSigns

public boolean hasSigns()
Indicates whether signs data is available for this animation.


getFrames

public CASFrame[] getFrames()
Returns this animation's sequence of frames.


waitForAnimationComplete

public void waitForAnimationComplete()
                              throws java.lang.InterruptedException
Delays the calling thread if necessary until this animation is complete.

Throws:
java.lang.InterruptedException

beginSignSequence

public void beginSignSequence()
Accepts notificatation that input of the sign sequence is starting.

Specified by:
beginSignSequence in interface SiGMLAnimationBuildHandler

setNextSign

public void setNextSign(AnimatedSign as)
Accepts the given sign (not yet animated) as the next one in this animation.

Specified by:
setNextSign in interface SiGMLAnimationBuildHandler

nextSignAnimationIsDone

public void nextSignAnimationIsDone()
Accepts notification that animation has now been generated for one more of this animation's signs.

Specified by:
nextSignAnimationIsDone in interface SiGMLAnimationBuildHandler

endSignSequence

public void endSignSequence()
Accetps notification that no further signs are to be added to the sequence for this animation.

Specified by:
endSignSequence in interface SiGMLAnimationBuildHandler