|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.midlet.MIDlet
com.sun.perseus.demo.PlaySVGImageDemo
public class PlaySVGImageDemo
Simple demo which plays an SVG animation, using the JSR 226 SVGAnimator class.
Field Summary | |
---|---|
protected org.w3c.dom.Document |
doc
The Document associated with the SVGAnimator |
static java.lang.String |
ERROR_COULD_NOT_LOAD_SVG
Error message thrown when the SVG resource could not be loaded. |
static int |
KEY_HELP
|
static int |
KEY_PAUSE
|
static int |
KEY_PLAY
|
static int |
KEY_ROTATE
|
static int |
KEY_START_DEMO
|
static int |
KEY_STOP
Key codes used to control the animator's state. |
static long |
SPLASH_MIN_LENGTH
The minimal amount of time to wait when a splash screen is displayed. |
protected javax.microedition.lcdui.Canvas |
splashCanvas
The splash Canvas. |
java.lang.String |
splashImageName
The optional splash image to show while the resources for the MIDlet are loading. |
protected int |
state
One of STATE_STOPPED, STATE_PAUSED, STATE_PLAYING or STATE_INTERRUPTED |
static int |
STATE_INTERRUPTED
|
static int |
STATE_PAUSED
|
static int |
STATE_PLAYING
|
static int |
STATE_STOPPED
State constants. |
protected org.w3c.dom.svg.SVGSVGElement |
svg
The root svg element. |
static java.lang.String |
SVG_NAMESPACE_URI
The SVG Namespace URI. |
protected javax.microedition.m2g.SVGAnimator |
svgAnimator
The SVGAnimator built from the SVG resource. |
protected javax.microedition.lcdui.Canvas |
svgCanvas
The Canvas, managed by the SVGAnimator, where the SVG animation is displayed. |
protected javax.microedition.m2g.SVGImage |
svgImage
The SVGImage associated with the SVGAnimator |
java.lang.String |
svgImageName
The SVG image played by this MIDlet is stored along the MIDlet's code. |
Constructor Summary | |
---|---|
PlaySVGImageDemo(java.lang.String svgImage,
java.lang.String splashImage,
boolean autoStart)
|
Method Summary | |
---|---|
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
|
void |
destroyApp(boolean unconditional)
|
void |
hideNotify()
|
void |
keyPressed(int keyCode)
|
void |
keyReleased(int keyCode)
|
void |
pauseApp()
|
void |
pointerPressed(int x,
int y)
|
void |
pointerReleased(int x,
int y)
|
void |
showNotify()
|
void |
sizeChanged(int width,
int height)
|
void |
startApp()
|
Methods inherited from class javax.microedition.midlet.MIDlet |
---|
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SVG_NAMESPACE_URI
public static final long SPLASH_MIN_LENGTH
public static final int STATE_STOPPED
public static final int STATE_PAUSED
public static final int STATE_PLAYING
public static final int STATE_INTERRUPTED
public static final int KEY_STOP
public static final int KEY_PLAY
public static final int KEY_PAUSE
public static final int KEY_START_DEMO
public static final int KEY_ROTATE
public static final int KEY_HELP
public static final java.lang.String ERROR_COULD_NOT_LOAD_SVG
public final java.lang.String svgImageName
public final java.lang.String splashImageName
protected javax.microedition.lcdui.Canvas svgCanvas
SVGAnimator.getTargetComponent()
protected javax.microedition.lcdui.Canvas splashCanvas
protected javax.microedition.m2g.SVGAnimator svgAnimator
protected javax.microedition.m2g.SVGImage svgImage
protected org.w3c.dom.Document doc
protected org.w3c.dom.svg.SVGSVGElement svg
protected int state
Constructor Detail |
---|
public PlaySVGImageDemo(java.lang.String svgImage, java.lang.String splashImage, boolean autoStart)
Method Detail |
---|
public void startApp()
startApp
in class javax.microedition.midlet.MIDlet
public void keyPressed(int keyCode)
keyPressed
in interface javax.microedition.m2g.SVGEventListener
public void keyReleased(int keyCode)
keyReleased
in interface javax.microedition.m2g.SVGEventListener
public void pointerPressed(int x, int y)
pointerPressed
in interface javax.microedition.m2g.SVGEventListener
public void pointerReleased(int x, int y)
pointerReleased
in interface javax.microedition.m2g.SVGEventListener
public void hideNotify()
hideNotify
in interface javax.microedition.m2g.SVGEventListener
public void showNotify()
showNotify
in interface javax.microedition.m2g.SVGEventListener
public void sizeChanged(int width, int height)
sizeChanged
in interface javax.microedition.m2g.SVGEventListener
public void pauseApp()
pauseApp
in class javax.microedition.midlet.MIDlet
public void destroyApp(boolean unconditional)
destroyApp
in class javax.microedition.midlet.MIDlet
public void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
commandAction
in interface javax.microedition.lcdui.CommandListener
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |