sigmlanim
Class AnimationLoader

java.lang.Object
  extended by sigmlanim.AnimationLoader

public class AnimationLoader
extends java.lang.Object

An AnimationLoader loads or generates a sequence of CAS animation frames from a variety of sources: a CAS file, a SAX input-source, a SiGML file, URL or String.

The hasAnimation() and getAnimation() methods give access to the results of the latest load/generation operation, such as they may be.


Constructor Summary
AnimationLoader(JAOptions jopts)
          Constructs a new animation loader supported by the given JA-options set.
 
Method Summary
 SiGMLAnimation getAnimation()
          Returns this loader's current SiGMLAnimation data-set, or null if it has none.
 boolean hasAnimation()
          Indicates whether or not this loader currently has a valid SiGMLAnimation data-set.
 void loadAnimationForCAS(java.net.URL casurl)
          Loads an animation consisting of a sequence of CAS frames from the given file.
 void loadAnimationForSiGML(java.lang.String sigml)
          Generates a SiGMLAnimation data set, including a sequence of CAS frames, from the given SiGML string.
 void loadAnimationForSiGML(java.net.URL sigmlurl)
          Loads a SiGML string from the given URL, and generates from it a SiGMLAnimation data set, including a sequence of CAS frames.
 void setAnimationFrames(CASFrame[] frms)
          Replaces this loader's animation frame sequence with the given one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationLoader

public AnimationLoader(JAOptions jopts)
Constructs a new animation loader supported by the given JA-options set.

Method Detail

hasAnimation

public boolean hasAnimation()
Indicates whether or not this loader currently has a valid SiGMLAnimation data-set.


getAnimation

public SiGMLAnimation getAnimation()
Returns this loader's current SiGMLAnimation data-set, or null if it has none.


setAnimationFrames

public void setAnimationFrames(CASFrame[] frms)
Replaces this loader's animation frame sequence with the given one.


loadAnimationForCAS

public void loadAnimationForCAS(java.net.URL casurl)
Loads an animation consisting of a sequence of CAS frames from the given file.


loadAnimationForSiGML

public void loadAnimationForSiGML(java.net.URL sigmlurl)
                           throws java.lang.InterruptedException
Loads a SiGML string from the given URL, and generates from it a SiGMLAnimation data set, including a sequence of CAS frames.

Throws:
java.lang.InterruptedException

loadAnimationForSiGML

public void loadAnimationForSiGML(java.lang.String sigml)
                           throws java.lang.InterruptedException
Generates a SiGMLAnimation data set, including a sequence of CAS frames, from the given SiGML string.

Throws:
java.lang.InterruptedException