XMT-O Reference Software

xmto2xmta.mapanimation
Class AniAnimationElement

java.lang.Object
  |
  +--xmto2xmta.MapRoot
        |
        +--xmto2xmta.mapanimation.AniAnimationBaseElement
              |
              +--xmto2xmta.mapanimation.AniAnimationElement
All Implemented Interfaces:
MapInterface
Direct Known Subclasses:
AniAnimate, AniAnimateMotion

public abstract class AniAnimationElement
extends AniAnimationBaseElement

Class to group together the various type of media elements.

History:


Field Summary
private  java.util.ResourceBundle animateColorRes_
           
private  java.util.ResourceBundle animationElementRes_
           
private static boolean debug_
          Whether debug information is to be printed to the console.
private  AnimationElement treeAnimationElement_
           
private  java.util.ResourceBundle xmto2XmtaRes_
           
 
Fields inherited from class xmto2xmta.mapanimation.AniAnimationBaseElement
xmtaNodeContainerId_
 
Fields inherited from class xmto2xmta.MapRoot
treeElement_, xmto2xmta_
 
Constructor Summary
AniAnimationElement()
           
 
Method Summary
private  boolean createDeleteMapping(ELASid elasId)
          Delete the nodes created for animation.
private  boolean createInsertMapping(ELASid elasId)
          Create the animation infrastructure.
private  boolean createResetTargetValues(TimingAttribute animationFillEndTime)
          Reset the target element's value.
private  boolean createRoutesFromInterpoator(java.lang.String interpolatorId, TimingAttribute interpolatorInsertTime, TimingAttribute interpolatorEndFillTime)
          Create the routes from interpolator to the target object.
 void doMapping()
           
private  boolean doTimingMapping()
           
private  boolean fillInRoutesFromInterpoator(org.w3c.dom.Element insertRoutes, java.lang.String interpolatorId, java.lang.String targetNodeId, java.lang.String targetField)
          Create the route from the interpolator to the correct node and field.
private  boolean fillInRoutesFromInterpoatorToDefsTarget(org.w3c.dom.Element insertRoutes, java.lang.String interpolatorId, Animatable target)
          Create the route from the interpolator to the correct node and field.
private  boolean fillInRoutesFromInterpoatorToTimingTarget(org.w3c.dom.Element insertRoutes, java.lang.String interpolatorId, Animatable target, ELASid targetElasId)
          Create the route from the interpolator to the correct node and field.
private  boolean fillResetDefsTargetValue(org.w3c.dom.Element parNodes, Animatable target)
          Reset the target element's value.
private  boolean fillResetTargetValue(org.w3c.dom.Element parNodes, java.lang.String animXmtaNodeId, java.lang.String animXmtaAttrName, java.lang.String animXmtaAttrInitialValue)
          Reset the target element's value.
private  boolean fillResetTimingTargetValue(org.w3c.dom.Element parNodes, Animatable target, ELASid targetElasId)
          Reset the target element's value.
protected abstract  java.lang.String getXmtoAttrAttributeName()
          Return the name of the attribute to be animated.
 void init(Xmto2Xmta xmto2xmta, ConvertElement element)
           
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
 
Methods inherited from class xmto2xmta.mapanimation.AniAnimationBaseElement
getXmtaNodeContainerId
 
Methods inherited from class xmto2xmta.MapRoot
fireErrorEvent, fireErrorEvent, fireErrorEvent, getConvertElement
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

debug_

private static boolean debug_
Whether debug information is to be printed to the console. default is not have debug information printed (false).

treeAnimationElement_

private AnimationElement treeAnimationElement_

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_

animationElementRes_

private java.util.ResourceBundle animationElementRes_

animateColorRes_

private java.util.ResourceBundle animateColorRes_
Constructor Detail

AniAnimationElement

public AniAnimationElement()
Method Detail

createDeleteMapping

private boolean createDeleteMapping(ELASid elasId)
Delete the nodes created for animation. Delete the TimeSensor and ColorIntropolator nodes. Create the animation infrastructure. What has to be deleted are:
  1. Disable the TimeSensor (during the fill time).
  2. Reset the initial value for the object.
  3. Delete the TimeSensor and Interpolator.
   <par begin="???">
     <Replace atNode="???" atField="enabled" value="false"/>
   </par>
   <par begin="???">
     <Delete atNode="???"/>
     <Delete atNode="???"/>
   </par>
 

createInsertMapping

private boolean createInsertMapping(ELASid elasId)
Create the animation infrastructure. NOTE: the timing for animations done differently than the other dealings with intervals. Here we have one mapping for an active interval, other places we have a mapping for each simple interval Map the timings using the entire activeInterval. Thus only pass in the first elasid to the routines

What has to be created:

  1. Create the TimeSensor and set up the times to be when it starts/ends and loop times if any.
  2. Create the Interpolator and set up the values for it.
  3. Create the routes between the interpolator and the target object to be animated. It is possible that there are more than one target object simple duration, active interval or lifecycle for this animation. This is because the timing of the animation (creation and deletion) can be in a different tree from the animation.
   <par begin="???">
     <Insert atNode="???">
       <TimeSensor DEF="???" cycleInterval="???"/>
       <???Interpolator??? DEF="???" key="???" keyValue="???"/>
       <ROUTE fromField="fraction_changed" fromNode="???" toField="set_fraction"  toNode="???"/>
     </Insert>
   </par>
 

createResetTargetValues

private boolean createResetTargetValues(TimingAttribute animationFillEndTime)
Reset the target element's value.
   <par begin="???">
     <Replace atNode="???" atField="??" value="???"/>
   </par>
 

createRoutesFromInterpoator

private boolean createRoutesFromInterpoator(java.lang.String interpolatorId,
                                            TimingAttribute interpolatorInsertTime,
                                            TimingAttribute interpolatorEndFillTime)
Create the routes from interpolator to the target object. What this requires is finding all the interval times of the target object which overlap with the interpolator. Then at the begining of the overlaps create a route from the interpolator to the target.
   <par begin="???">
     <Insert>
       <ROUTE fromField="value_changed"    fromNode="???" toField="???"           toNode="???"/>
     </Insert>
   </par>
 

doMapping

public void doMapping()

doTimingMapping

private boolean doTimingMapping()

fillInRoutesFromInterpoator

private boolean fillInRoutesFromInterpoator(org.w3c.dom.Element insertRoutes,
                                            java.lang.String interpolatorId,
                                            java.lang.String targetNodeId,
                                            java.lang.String targetField)
Create the route from the interpolator to the correct node and field.
   <ROUTE fromField="value_changed"    fromNode="???" toField="???"           toNode="???"/>
 

fillInRoutesFromInterpoatorToDefsTarget

private boolean fillInRoutesFromInterpoatorToDefsTarget(org.w3c.dom.Element insertRoutes,
                                                        java.lang.String interpolatorId,
                                                        Animatable target)
Create the route from the interpolator to the correct node and field.
   <ROUTE fromField="value_changed"    fromNode="???" toField="???"           toNode="???"/>
 

fillInRoutesFromInterpoatorToTimingTarget

private boolean fillInRoutesFromInterpoatorToTimingTarget(org.w3c.dom.Element insertRoutes,
                                                          java.lang.String interpolatorId,
                                                          Animatable target,
                                                          ELASid targetElasId)
Create the route from the interpolator to the correct node and field.
   <ROUTE fromField="value_changed"    fromNode="???" toField="???"           toNode="???"/>
 

fillResetDefsTargetValue

private boolean fillResetDefsTargetValue(org.w3c.dom.Element parNodes,
                                         Animatable target)
Reset the target element's value.
   <Replace atNode="???" atField="??" value="???"/>
 

fillResetTargetValue

private boolean fillResetTargetValue(org.w3c.dom.Element parNodes,
                                     java.lang.String animXmtaNodeId,
                                     java.lang.String animXmtaAttrName,
                                     java.lang.String animXmtaAttrInitialValue)
Reset the target element's value.
   <Replace atNode="???" atField="??" value="???"/>
 

fillResetTimingTargetValue

private boolean fillResetTimingTargetValue(org.w3c.dom.Element parNodes,
                                           Animatable target,
                                           ELASid targetElasId)
Reset the target element's value.
   <Replace atNode="???" atField="??" value="???"/>
 

getXmtoAttrAttributeName

protected abstract java.lang.String getXmtoAttrAttributeName()
Return the name of the attribute to be animated.

init

public void init(Xmto2Xmta xmto2xmta,
                 ConvertElement element)
          throws java.lang.Exception
Overrides:
init in class MapRoot

setDebug

public static void setDebug(boolean debug)
Enable debugging information to be printed to the console.
Parameters:
debug - sets debug information is printed

XMT-O Reference Software