|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
org.netbeans.microedition.svg.SVGPlayer
public class SVGPlayer
This class encapsulates SVGAnimator and exposes some of its setters, so it can be used as a component in NetBeans Visual Designer. It also adds many utility methods which can be used to easily manipulate the underlying document of the animated SVG image.
Even though this class extends Canvas, the Canvas is utilized only for forwarding command actions from Canvas created by SVGAnimator.
Field Summary | |
---|---|
static int |
BOTTOM
Anchor point constants. |
static int |
BOTTOM_LEFT
Anchor point constants. |
static int |
BOTTOM_RIGHT
Anchor point constants. |
static int |
CENTER
Anchor point constants. |
static int |
LEFT
Anchor point constants. |
static int |
PAUSED
Animator is paused (i.e. when started again, the animation will continue from the paused state) |
static int |
PLAYING
Animator is running animation |
static int |
RIGHT
Anchor point constants. |
static int |
STOPPED
Animator is stopped (i.e. when started again, the animation will start from the beginning) |
static int |
TOP
Anchor point constants. |
static int |
TOP_LEFT
Anchor point constants. |
static int |
TOP_RIGHT
Anchor point constants. |
Fields inherited from class javax.microedition.lcdui.Canvas |
---|
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, UP |
Constructor Summary | |
---|---|
SVGPlayer(javax.microedition.m2g.SVGImage svgImage,
javax.microedition.lcdui.Display display)
Creates a new instance of SvgAnimatorHelper. |
Method Summary | |
---|---|
void |
addCommand(javax.microedition.lcdui.Command cmd)
Adds command to the animation canvas (not this canvas) |
void |
commandAction(javax.microedition.lcdui.Command command,
javax.microedition.lcdui.Displayable displayable)
Implementation of CommandListener.commandAction() which forwards command action from Canvas created by SVGAnimator to the CommandListener assigned to this component |
protected float[] |
computeAnchorTranslate(org.w3c.dom.svg.SVGRect bbox,
int anchor)
Computes the translation needed to center the given rectangle about the desired anchor position. |
protected javax.microedition.m2g.SVGAnimator |
getAnimator()
Gets SVGAnimator created in this player. |
int |
getAnimatorState()
Returns state of the animation |
protected javax.microedition.lcdui.CommandListener |
getCommandListener()
Gets command listener assigned to this displayable. |
protected javax.microedition.lcdui.Display |
getDisplay()
Gets Display |
org.w3c.dom.Document |
getDocument()
|
javax.microedition.m2g.SVGEventListener |
getSafeSVGEventListener()
Gets user's "Safe" SVGEventListener which is being called in the document update thread. |
org.w3c.dom.svg.SVGRect |
getScreenBBox(java.lang.String id)
Returns the screen bounding box for the desired element. |
org.w3c.dom.svg.SVGAnimationElement |
getSVGAnimationElementById(java.lang.String id)
Gets SVGAnimationElement from the SVGImage used for this SVGPlayer. |
javax.microedition.lcdui.Canvas |
getSvgCanvas()
Gets Canvas which was created by the SVGAnimator |
org.w3c.dom.svg.SVGElement |
getSVGElementById(java.lang.String id)
Gets SVGElement from the SVGImage used for this SVGPlayer. |
javax.microedition.m2g.SVGEventListener |
getSVGEventListener()
Gets user's SVGEventListener |
javax.microedition.m2g.SVGImage |
getSVGImage()
Gets SVGImage used to create this SVGPlayer. |
org.w3c.dom.svg.SVGLocatableElement |
getSVGLocatableElementById(java.lang.String id)
Gets SVGLocatableElement from the SVGImage used for this SVGPlayer. |
javax.microedition.lcdui.Ticker |
getTicker()
Gets ticker from the animation canvas (not this canvas) |
float |
getTimeIncrement()
Gets time increment of the animation. |
java.lang.String |
getTitle()
Gets title from the animation canvas (not this canvas) |
void |
invokeAndWait(java.lang.Runnable runnable)
Proxy call for SVGAnimator.invokeAndWait() method. |
void |
invokeAndWaitSafely(java.lang.Runnable runnable)
Invokes the input Runnable in the document update thread and returns after the Runnable has completed. |
void |
invokeLater(java.lang.Runnable runnable)
Proxy call for SVGAnimator.invokeLater() method. |
void |
invokeLaterSafely(java.lang.Runnable runnable)
Schedule the input Runnable for execution in the update thread\ at a later time. |
boolean |
isResetAnimationWhenStopped()
Should be animation reset whhen stopped |
protected void |
paint(javax.microedition.lcdui.Graphics graphics)
Dummy paint method - does nothing, because all the rendering is done by the canvas obtained from SVGAnimator |
void |
pause()
Pauses the animation. |
void |
play()
Starts the animation. |
void |
removeCommand(javax.microedition.lcdui.Command cmd)
Removes command from the animation canvas (not this canvas) |
void |
reset()
reset the animation, so it starts again from the beginning. |
void |
rotate(java.lang.String id,
float angle)
Rotates the element with the given id by the given angle. |
void |
rotate(org.w3c.dom.svg.SVGElement svgElement,
float angle)
Rotates the element with the given id by the given angle. |
void |
rotateAbout(java.lang.String id,
float angle,
int anchor)
Rotates the element with the given id by the given angle about the desired anchor point. |
void |
rotateAbout(org.w3c.dom.svg.SVGLocatableElement svgLocatableElement,
float angle,
int anchor)
Rotates the element with the given id by the given angle about the desired anchor point. |
void |
rotateAboutSafely(java.lang.String id,
float angle,
int anchor)
Rotates the element with the given id by the given angle about the desired anchor point. |
void |
rotateSafely(java.lang.String id,
float angle)
Rotates the element with the given id by the given angle. |
void |
scale(java.lang.String id,
float sx,
float sy)
Scales the element with the specified id by the given factor along the x and y axis. |
void |
scale(org.w3c.dom.svg.SVGElement svgElement,
float sx,
float sy)
Scales the element with the specified id by the given factor along the x and y axis. |
void |
scaleAbout(java.lang.String id,
float sx,
float sy,
int anchor)
Scales the element with the given id about the desired anchor point. |
void |
scaleAbout(org.w3c.dom.svg.SVGLocatableElement svgLocatableElement,
float sx,
float sy,
int anchor)
Scales the element with the given id about the desired anchor point. |
void |
scaleAboutSafely(java.lang.String id,
float sx,
float sy,
int anchor)
Scales the element with the given id about the desired anchor point. |
void |
scaleSafely(java.lang.String id,
float sx,
float sy)
Scales the element with the specified id by the given factor along the x and y axis. |
void |
screenTranslate(java.lang.String id,
float tx,
float ty)
Translates the element with the specified id by the given amount, in the screen coordinate space. |
void |
screenTranslate(org.w3c.dom.svg.SVGLocatableElement svgLocatableElement,
float tx,
float ty)
Translates the element with the specified id by the given amount, in the screen coordinate space. |
void |
screenTranslateSafely(java.lang.String id,
float tx,
float ty)
Translates the element with the specified id by the given amount, in the screen coordinate space. |
void |
setCommandListener(javax.microedition.lcdui.CommandListener commandListener)
Sets command listener to this displayable |
void |
setFloatTrait(java.lang.String id,
java.lang.String traitName,
float traitValue)
Sets the desired trait on the element with the specified identifier. |
void |
setFloatTraitSafely(java.lang.String id,
java.lang.String traitName,
float traitValue)
Sets the desired trait on the element with the specified identifier. |
void |
setFullScreenMode(boolean mode)
sets fullscreen mode the animation canvas (not this canvas) |
void |
setResetAnimationWhenStopped(boolean reset)
Sets |
void |
setRGBTrait(java.lang.String id,
java.lang.String traitName,
int rgb)
Sets the desired RGB value on the element with the specified identifier. |
void |
setRGBTrait(java.lang.String id,
java.lang.String traitName,
int r,
int g,
int b)
Sets the desired RGB value on the element with the specified identifier. |
void |
setRGBTraitSafely(java.lang.String id,
java.lang.String traitName,
int rgb)
Sets the desired RGB value on the element with the specified identifier. |
void |
setRGBTraitSafely(java.lang.String id,
java.lang.String traitName,
int r,
int g,
int b)
Sets the desired RGB value on the element with the specified identifier. |
void |
setSafeSVGEventListener(javax.microedition.m2g.SVGEventListener safeSvgEventListener)
Sets a user's SVGEventListener to be called in the document update thread. |
void |
setStartAnimationImmediately(boolean startAnimation)
When set to true, the animation starts immediatelly when the canvas with animation displayed on the screen |
void |
setSVGEventListener(javax.microedition.m2g.SVGEventListener svgEventListener)
Sets a user's SVGEventListener to the SVGAnimator |
void |
setTicker(javax.microedition.lcdui.Ticker ticker)
Sets ticker to the animation canvas (not this canvas) |
void |
setTimeIncrement(float timeIncrement)
Sets time increment for the animation. |
void |
setTitle(java.lang.String s)
Sets title to the animation canvas (not this canvas) |
void |
setTrait(java.lang.String id,
java.lang.String traitName,
java.lang.String traitValue)
Sets the desired trait on the element with the specified identifier. |
void |
setTraitSafely(java.lang.String id,
java.lang.String traitName,
java.lang.String traitValue)
Sets the desired trait on the element with the specified identifier. |
void |
startAnimation(java.lang.String elementId)
Starts immediately animation on the given animation element. |
void |
startAnimation(java.lang.String elementId,
float delay)
Starts immediately animation on the given animation element. |
void |
startAnimationSafely(java.lang.String elementId)
Starts immediately animation on the given animation element. |
void |
stop()
Stops the animation. |
void |
stopAnimation(java.lang.String elementId)
Stops animation on the given animation element. |
void |
stopAnimation(java.lang.String elementId,
float delay)
Stops animation on the given animation element, with given delay. |
void |
stopAnimationSafely(java.lang.String elementId)
Stops animation on the given animation element. |
void |
translate(java.lang.String id,
float tx,
float ty)
Translates the element with the specified id by the given amount, in user space. |
void |
translate(org.w3c.dom.svg.SVGElement svgElement,
float tx,
float ty)
Translates the element with the specified id by the given amount, in user space. |
void |
translateSafely(java.lang.String id,
float tx,
float ty)
Translates the element with the specified id by the given amount, in user space. |
Methods inherited from class javax.microedition.lcdui.Canvas |
---|
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotify, isDoubleBuffered, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, serviceRepaints, showNotify, sizeChanged |
Methods inherited from class javax.microedition.lcdui.Displayable |
---|
getHeight, getWidth, isShown |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TOP_LEFT
public static final int TOP
public static final int TOP_RIGHT
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int BOTTOM_LEFT
public static final int BOTTOM
public static final int BOTTOM_RIGHT
public static final int STOPPED
public static final int PAUSED
public static final int PLAYING
Constructor Detail |
---|
public SVGPlayer(javax.microedition.m2g.SVGImage svgImage, javax.microedition.lcdui.Display display) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
Method Detail |
---|
public javax.microedition.lcdui.Canvas getSvgCanvas()
public org.w3c.dom.Document getDocument()
public javax.microedition.m2g.SVGEventListener getSVGEventListener()
public void setSVGEventListener(javax.microedition.m2g.SVGEventListener svgEventListener)
svgEventListener
- user SVGEventListener or null if no listener should be setpublic javax.microedition.m2g.SVGEventListener getSafeSVGEventListener()
public void setSafeSVGEventListener(javax.microedition.m2g.SVGEventListener safeSvgEventListener)
safeSvgEventListener
- user SVGEventListener or null if no listener should be setpublic void setTimeIncrement(float timeIncrement)
timeIncrement
- the minimal time that should ellapse between frame rendering. In seconds. Should be greater than zero.
java.lang.IllegalArgumentException
- - if timeIncrement is less than or equal to zero.public float getTimeIncrement()
public void pause()
public void stop()
public void play()
public void reset()
public int getAnimatorState()
public void invokeAndWait(java.lang.Runnable runnable) throws java.lang.InterruptedException
runnable
- Runnable to be passed to SVGAnimator.invokeAndWait(runnable) method.
java.lang.InterruptedException
public void invokeLater(java.lang.Runnable runnable)
runnable
- Runnable to be passed to SVGAnimator.invokeLater(runnable) method.public java.lang.String getTitle()
getTitle
in class javax.microedition.lcdui.Displayable
public void setTitle(java.lang.String s)
setTitle
in class javax.microedition.lcdui.Displayable
s
- title Stringpublic void addCommand(javax.microedition.lcdui.Command cmd)
addCommand
in class javax.microedition.lcdui.Displayable
public void removeCommand(javax.microedition.lcdui.Command cmd)
removeCommand
in class javax.microedition.lcdui.Displayable
public javax.microedition.lcdui.Ticker getTicker()
getTicker
in class javax.microedition.lcdui.Displayable
public void setTicker(javax.microedition.lcdui.Ticker ticker)
setTicker
in class javax.microedition.lcdui.Displayable
public void setFullScreenMode(boolean mode)
setFullScreenMode
in class javax.microedition.lcdui.Canvas
public void setStartAnimationImmediately(boolean startAnimation)
public boolean isResetAnimationWhenStopped()
public void setResetAnimationWhenStopped(boolean reset)
protected final javax.microedition.lcdui.CommandListener getCommandListener()
public void setCommandListener(javax.microedition.lcdui.CommandListener commandListener)
setCommandListener
in class javax.microedition.lcdui.Canvas
protected javax.microedition.lcdui.Display getDisplay()
protected javax.microedition.m2g.SVGAnimator getAnimator()
public final javax.microedition.m2g.SVGImage getSVGImage()
public org.w3c.dom.svg.SVGElement getSVGElementById(java.lang.String id) throws java.lang.IllegalArgumentException
id
- an id of the svg element to be obtained
java.lang.IllegalArgumentException
- if the supplied id is nullpublic org.w3c.dom.svg.SVGLocatableElement getSVGLocatableElementById(java.lang.String id) throws java.lang.IllegalArgumentException
id
- an id of the svg element to be obtained
java.lang.IllegalArgumentException
- if the supplied id is nullpublic org.w3c.dom.svg.SVGAnimationElement getSVGAnimationElementById(java.lang.String id) throws java.lang.IllegalArgumentException
id
- an id of the animation element to be obtained
java.lang.IllegalArgumentException
- if the supplied id is nullpublic void invokeLaterSafely(java.lang.Runnable runnable)
runnable
- a runnable scheduled for invokation in update threadpublic void invokeAndWaitSafely(java.lang.Runnable runnable)
runnable
- a runnable scheduled for invokation in update threadpublic void setTraitSafely(java.lang.String id, java.lang.String traitName, java.lang.String traitValue)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "display"traitValue
- the value of the trait to set, e.g., "none"public void setTrait(java.lang.String id, java.lang.String traitName, java.lang.String traitValue)
Note:This method needs to be called from the document update thread.
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "display"traitValue
- the value of the trait to set, e.g., "none"public void setFloatTraitSafely(java.lang.String id, java.lang.String traitName, float traitValue)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "display"traitValue
- the value of the trait to set, e.g., "none"public void setFloatTrait(java.lang.String id, java.lang.String traitName, float traitValue)
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "display"traitValue
- the value of the trait to set, e.g., "none"public void setRGBTraitSafely(java.lang.String id, java.lang.String traitName, int rgb)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "stroke" or "fill"rgb
- the color value as an int in the following format 0xXXRRGGBB.
The high order byte is ignored. For example, 0xFFFF0000 specifies
red.public void setRGBTrait(java.lang.String id, java.lang.String traitName, int rgb)
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "stroke" or "fill"rgb
- the color value as an int in the following format 0xXXRRGGBB.
The high order byte is ignored. For example, 0xFFFF0000 specifies
red.public void setRGBTraitSafely(java.lang.String id, java.lang.String traitName, int r, int g, int b)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "fill"r
- the desired red component value, in the 0-255 intervalg
- the desired green component value, in the 0-255 intervalb
- the desired blue component value, in the 0-255 intervalpublic void setRGBTrait(java.lang.String id, java.lang.String traitName, int r, int g, int b)
id
- the id of the element whose trait value should be changed.traitName
- the name of the trait to change, e.g, "fill"r
- the desired red component value, in the 0-255 intervalg
- the desired green component value, in the 0-255 intervalb
- the desired blue component value, in the 0-255 intervalpublic void translateSafely(java.lang.String id, float tx, float ty)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.tx
- the desired translation along the x-axisty
- the desired translation along the y-axispublic void translate(java.lang.String id, float tx, float ty)
id
- the id of the element whose trait value should be changed.tx
- the desired translation along the x-axisty
- the desired translation along the y-axispublic void translate(org.w3c.dom.svg.SVGElement svgElement, float tx, float ty)
svgElement
- the element whose trait value should be changed. If null,
the operation is not performed.tx
- the desired translation along the x-axisty
- the desired translation along the y-axispublic void screenTranslateSafely(java.lang.String id, float tx, float ty)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.tx
- the desired translation along the x-axisty
- the desired translation along the y-axispublic void screenTranslate(java.lang.String id, float tx, float ty)
id
- the id of the element whose trait value should be changed.tx
- the desired translation along the x-axisty
- the desired translation along the y-axispublic void screenTranslate(org.w3c.dom.svg.SVGLocatableElement svgLocatableElement, float tx, float ty)
svgLocatableElement
- the element whose trait value should be changed.
If null, the operation is not performed.tx
- the desired translation along the x-axisty
- the desired translation along the y-axispublic org.w3c.dom.svg.SVGRect getScreenBBox(java.lang.String id)
id
- the id of the element whose bounding box is retrieved.
public void scaleSafely(java.lang.String id, float sx, float sy)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.sx
- the desired scale factor along the x-axissy
- the desired scale factor along the y-axispublic void scale(java.lang.String id, float sx, float sy)
id
- the id of the element whose trait value should be changed.sx
- the desired scale factor along the x-axissy
- the desired scale factor along the y-axispublic void scale(org.w3c.dom.svg.SVGElement svgElement, float sx, float sy)
svgElement
- element whose trait value should be changed. If null, the
operation is not performed.sx
- the desired scale factor along the x-axissy
- the desired scale factor along the y-axispublic void scaleAboutSafely(java.lang.String id, float sx, float sy, int anchor)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element whose trait value should be changed.sx
- the desired scale factor along the x-axissy
- the desired scale factor along the y-axisanchor
- one of TOP_LEFT, TOP, TOP_RIGHT, LEFT, CENTER, RIGHT,
BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT.public void scaleAbout(java.lang.String id, float sx, float sy, int anchor)
id
- the id of the element whose trait value should be changed.sx
- the desired scale factor along the x-axissy
- the desired scale factor along the y-axisanchor
- one of TOP_LEFT, TOP, TOP_RIGHT, LEFT, CENTER, RIGHT,
BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT.public void scaleAbout(org.w3c.dom.svg.SVGLocatableElement svgLocatableElement, float sx, float sy, int anchor)
svgLocatableElement
- element whose trait value should be changed. If null
the operation is not performed.sx
- the desired scale factor along the x-axissy
- the desired scale factor along the y-axisanchor
- one of TOP_LEFT, TOP, TOP_RIGHT, LEFT, CENTER, RIGHT,
BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT.public void rotateSafely(java.lang.String id, float angle)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element which should be rotated.angle
- the rotation angle, in degreespublic void rotate(java.lang.String id, float angle)
id
- the id of the element which should be rotated.angle
- the rotation angle, in degreespublic void rotate(org.w3c.dom.svg.SVGElement svgElement, float angle)
svgElement
- the element which should be rotated. If null, the
operation is not performed.angle
- the rotation angle, in degreespublic void rotateAboutSafely(java.lang.String id, float angle, int anchor)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
id
- the id of the element which should be rotated.angle
- the rotation angle, in degreesanchor
- the reference point about which to rotate the element.public void rotateAbout(java.lang.String id, float angle, int anchor)
id
- the id of the element which should be rotated.angle
- the rotation angle, in degreesanchor
- the reference point about which to rotate the element.public void rotateAbout(org.w3c.dom.svg.SVGLocatableElement svgLocatableElement, float angle, int anchor)
svgLocatableElement
- the element which should be rotated. If null the
operation is not performed.angle
- the rotation angle, in degreesanchor
- the reference point about which to rotate the element.protected float[] computeAnchorTranslate(org.w3c.dom.svg.SVGRect bbox, int anchor)
bbox
- the object's bounding box, used to compute the translation.anchor
- the desired anchor position for the translation. For example,
if anchor is "BOTTOM_RIGHT", the returned translation will move the
bottom right of the bounding box to the coordinate system's origin.
public void startAnimationSafely(java.lang.String elementId)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
elementId
- id of the animation element on which the animation should be startedpublic void startAnimation(java.lang.String elementId)
elementId
- id of the animation element on which the animation should be started
java.lang.IllegalArgumentException
- if the elementID does not correspond to a valid SVGAnimationElementpublic void startAnimation(java.lang.String elementId, float delay)
elementId
- id of the animation element on which the animation should be starteddelay
- offset in seconds at which the animation should be startedpublic void stopAnimationSafely(java.lang.String elementId)
This method uses "safe" approach - i.e. when it runs in document update thread it runs directly in the thread, otherwise it is scheduled using SVGAnimator.invokeAndWait method.
elementId
- id of the animation element on which the animation should be stoppedpublic void stopAnimation(java.lang.String elementId)
elementId
- id of the animation element on which the animation should be stoppedpublic void stopAnimation(java.lang.String elementId, float delay)
elementId
- id of the animation element on which the animation should be stoppeddelay
- offset in seconds at which the animation should be stoppedprotected void paint(javax.microedition.lcdui.Graphics graphics)
paint
in class javax.microedition.lcdui.Canvas
public void commandAction(javax.microedition.lcdui.Command command, javax.microedition.lcdui.Displayable displayable)
commandAction
in interface javax.microedition.lcdui.CommandListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |