net.xoetrope.optional.svg.tinyline
Class PlayerListener

java.lang.Object
  extended by net.xoetrope.optional.svg.tinyline.PlayerListener
All Implemented Interfaces:
com.tinyline.svg.AnimationCallback, EventListener

public class PlayerListener
extends java.lang.Object
implements EventListener, com.tinyline.svg.AnimationCallback

This class represents the events listener for the TinyLine SVG player


Constructor Summary
PlayerListener(XSvgCanvas canvas)
           
 
Method Summary
 boolean animationsPaused()
          Returns true if this SVG document fragment is in a paused state.
 void doLink(com.tinyline.svg.SVGNode linkNode)
           
 int getCurrentTime()
          Returns the current time in seconds relative to the start time for the current SVG document fragment.
 void handleEvent(Event evt)
          uDOM: Invoked whenever an event occurs of the type for which the EventListener interface was registered.
 void pauseAnimations()
          Suspends (i.e., pauses) all currently running animations that are defined within the SVG document fragment corresponding to this 'svg' element, causing the animation clock corresponding to this document fragment to stand still until it is unpaused.
 void postSMILEvent(int eventType, com.tinyline.tiny2d.TinyString theEvent)
          SMIL: Posts the SMIL event from an animation element to an interested party.
 void resumeAnimations()
          Unsuspends (i.e., unpauses) currently running animations that are defined within the SVG document fragment, causing the animation clock to continue from the time at which it was suspended.
 void setCurrentTime(long seconds)
          Adjusts the clock for this SVG document fragment, establishing a new current time.
 void setStartTime()
          Sets a start time for this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerListener

public PlayerListener(XSvgCanvas canvas)
Method Detail

getCurrentTime

public int getCurrentTime()
Returns the current time in seconds relative to the start time for the current SVG document fragment.


setStartTime

public void setStartTime()
Sets a start time for this node.


setCurrentTime

public void setCurrentTime(long seconds)
Adjusts the clock for this SVG document fragment, establishing a new current time.

Parameters:
seconds - The new current time in seconds relative to the start time for the current SVG document fragment.

pauseAnimations

public void pauseAnimations()
Suspends (i.e., pauses) all currently running animations that are defined within the SVG document fragment corresponding to this 'svg' element, causing the animation clock corresponding to this document fragment to stand still until it is unpaused.


resumeAnimations

public void resumeAnimations()
Unsuspends (i.e., unpauses) currently running animations that are defined within the SVG document fragment, causing the animation clock to continue from the time at which it was suspended.


animationsPaused

public boolean animationsPaused()
Returns true if this SVG document fragment is in a paused state.


postSMILEvent

public void postSMILEvent(int eventType,
                          com.tinyline.tiny2d.TinyString theEvent)
SMIL: Posts the SMIL event from an animation element to an interested party. The SMIL event type can be one of

Specified by:
postSMILEvent in interface com.tinyline.svg.AnimationCallback
Parameters:
eventType - The SMIL event type
theEvent - The SMIL event

doLink

public void doLink(com.tinyline.svg.SVGNode linkNode)

handleEvent

public void handleEvent(Event evt)
uDOM: Invoked whenever an event occurs of the type for which the EventListener interface was registered.

Specified by:
handleEvent in interface EventListener
Parameters:
evt - The Event contains contextual information about the event.