FileDocCategorySizeDatePackage
SVGAnimatorImpl.javaAPI DocphoneME MR2 API (J2ME)3730Wed May 02 18:00:36 BST 2007com.sun.perseus.midp

SVGAnimatorImpl

public final class SVGAnimatorImpl extends javax.microedition.m2g.SVGAnimator
The SVGAnimatorImpl class implements the SVGAnimator JSR 226 class. It mostly delegates to the SVGCanvas class.
version
$Id: SVGAnimatorImpl.java,v 1.3 2006/04/21 06:40:54 st125089 Exp $

Fields Summary
static final String
MIDP_COMPONENT_CLASS
The class name for a MIDP Canvas.
SVGCanvas
svgCanvas
The associated SVG canvas.
Constructors Summary
private SVGAnimatorImpl(javax.microedition.m2g.SVGImage svgImage)
Creates a new SVGAnimatorImpl associated with the given SVGImage instance.

param
svgImage the SVGImage this animator implementation should play in a MIDP Canvas.


                                
        
        svgCanvas = new SVGCanvas((DocumentNode) svgImage.getDocument());
    
Methods Summary
public static javax.microedition.m2g.SVGAnimatorcreateAnimator(javax.microedition.m2g.SVGImage svgImage, java.lang.String componentBaseClass)

        if (svgImage == null) {
            throw new NullPointerException();
        }

        if (componentBaseClass != null 
            && 
            !MIDP_COMPONENT_CLASS.equals(componentBaseClass)) {
            throw new IllegalArgumentException();
        }

        return new SVGAnimatorImpl(svgImage);
    
public java.lang.ObjectgetTargetComponent()

        return svgCanvas;
    
public floatgetTimeIncrement()

        return svgCanvas.getTimeIncrement();
    
public voidinvokeAndWait(java.lang.Runnable runnable)

        svgCanvas.invokeAndWait(runnable);
    
public voidinvokeLater(java.lang.Runnable runnable)

        svgCanvas.invokeLater(runnable);
    
public voidpause()

        svgCanvas.pause();
    
public voidplay()

        svgCanvas.play();
    
public voidsetSVGEventListener(javax.microedition.m2g.SVGEventListener svgEventListener)

        svgCanvas.setSVGEventListener(svgEventListener);
    
public voidsetTimeIncrement(float timeIncrement)

        svgCanvas.setTimeIncrement(timeIncrement);
    
public voidstop()

        svgCanvas.stop();