sigmlanim.sigmlstream
Class FilteringSupplierForAnimGen

java.lang.Object
  extended by sigmlanim.sigmlstream.FilteringSupplierForAnimGen
All Implemented Interfaces:
StreamedSiGMLSupplierForAnimationGen

public class FilteringSupplierForAnimGen
extends java.lang.Object
implements StreamedSiGMLSupplierForAnimationGen

An implementation of StreamedSiGMLSupplierForAnimationGen which uses another StreamedSiGMLSupplierForAnimationGen as its primary supplier and which filters from the sign stream provided by the primary supplier those signs to which animation data has already been attached. 2010-10: Changed to allow animgen to read ahead by more than one sign, which it needs for multi-sign SiGML mode.


Constructor Summary
FilteringSupplierForAnimGen(StreamedSiGMLSupplierForAnimationGen SUPPLIER)
          Constructs a new filtering supplier that uses the given supplier as its own primary supplier.
 
Method Summary
 void doneSignAnimation()
          Accepts notification either from the animation generator or, in the case of a sign with animation data already attached, directly from getNextSignToBeAnimated() that one more sign has been completely generated, and forwards this notice to this supplier's primary supplier.
 AnimatedSign getNextSignToBeAnimated()
          Returns the next sign to be animated, or null if the source sign stream is exhausted.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteringSupplierForAnimGen

public FilteringSupplierForAnimGen(StreamedSiGMLSupplierForAnimationGen SUPPLIER)
Constructs a new filtering supplier that uses the given supplier as its own primary supplier.

Method Detail

getNextSignToBeAnimated

public AnimatedSign getNextSignToBeAnimated()
                                     throws java.lang.InterruptedException
Returns the next sign to be animated, or null if the source sign stream is exhausted. The sign returned is obtained from this supplier's primary supplier, possibly after filtering out any signs which already have animation data and making one call directly to doneSignAnimation() for each sign thus filtered.

Specified by:
getNextSignToBeAnimated in interface StreamedSiGMLSupplierForAnimationGen
Throws:
java.lang.InterruptedException

doneSignAnimation

public void doneSignAnimation()
Accepts notification either from the animation generator or, in the case of a sign with animation data already attached, directly from getNextSignToBeAnimated() that one more sign has been completely generated, and forwards this notice to this supplier's primary supplier.

Specified by:
doneSignAnimation in interface StreamedSiGMLSupplierForAnimationGen