org.vectomatic.dom.svg.impl
Class SVGAnimationElement

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.dom.client.Node
          extended by com.google.gwt.dom.client.Element
              extended by org.vectomatic.dom.svg.impl.SVGElement
                  extended by org.vectomatic.dom.svg.impl.SVGAnimationElement
Direct Known Subclasses:
SVGAnimateColorElement, SVGAnimateElement, SVGAnimateMotionElement, SVGAnimateTransformElement, SVGSetElement

public class SVGAnimationElement
extends SVGElement

The SVGAnimationElement interface is the base interface for all of the animation element interfaces: SVGAnimateElement, SVGSetElement, SVGAnimateColorElement, SVGAnimateMotionElement and SVGAnimateTransformElement.

Unlike other SVG DOM interfaces, the SVG DOM does not specify convenience DOM properties corresponding to the various language attributes on SVG's animation elements. Specification of these convenience properties in a way that will be compatible with future versions of SMIL Animation is expected in a future version of SVG. The current method for accessing and modifying the attributes on the animation elements is to use the standard getAttribute, setAttribute, getAttributeNS and setAttributeNS defined in DOM Level 2 Core [DOM2].


Field Summary
 
Fields inherited from class com.google.gwt.dom.client.Element
DRAGGABLE_AUTO, DRAGGABLE_FALSE, DRAGGABLE_TRUE
 
Fields inherited from class com.google.gwt.dom.client.Node
DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE
 
Constructor Summary
protected SVGAnimationElement()
           
 
Method Summary
 void beginElement()
          Creates a begin instance time for the current time.
 void beginElementAt(float offset)
          Creates a begin instance time for the current time plus the specified offset.
 void endElement()
          Creates an end instance time for the current time.
 void endElementAt(float offset)
          Creates a end instance time for the current time plus the specified offset.
 float getCurrentTime()
          Returns the current time in seconds relative to time zero for the given time container.
 OMSVGAnimatedBoolean getExternalResourcesRequired()
          Corresponds to attribute ISVGExternalResourcesRequired.getExternalResourcesRequired() on the given element.
 OMSVGStringList getRequiredExtensions()
          Corresponds to attribute ISVGTests.getRequiredExtensions() on the given element.
 OMSVGStringList getRequiredFeatures()
          Corresponds to attribute ISVGTests.getRequiredFeatures() on the given element.
 float getSimpleDuration()
          Returns the number of seconds for the simple duration for this animation.
 float getStartTime()
          Returns the begin time, in seconds, for this animation element's current interval, if it exists, regardless of whether the interval has begun yet.
 OMSVGStringList getSystemLanguage()
          Corresponds to attribute ISVGTests.getSystemLanguage() on the given element.
 SVGElement getTargetElement()
          The element which is being animated.
 boolean hasExtension(String extension)
          Returns true if the user agent supports the given extension, specified by a URI.
 
Methods inherited from class org.vectomatic.dom.svg.impl.SVGElement
getClassName_, getMarkup, getOwnerSVGElement, getViewportElement, getXmlbase, setXmlbase
 
Methods inherited from class com.google.gwt.dom.client.Element
addClassName, as, as, blur, dispatchEvent, focus, getAbsoluteBottom, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getAttribute, getClassName, getClientHeight, getClientWidth, getDir, getDraggable, getElementsByTagName, getFirstChildElement, getId, getInnerHTML, getInnerText, getLang, getNextSiblingElement, getOffsetHeight, getOffsetLeft, getOffsetParent, getOffsetTop, getOffsetWidth, getPropertyBoolean, getPropertyDouble, getPropertyInt, getPropertyJSO, getPropertyObject, getPropertyString, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getString, getStyle, getTabIndex, getTagName, getTitle, hasAttribute, hasTagName, is, is, removeAttribute, removeClassName, replaceClassName, scrollIntoView, setAttribute, setClassName, setDir, setDraggable, setId, setInnerHTML, setInnerText, setLang, setPropertyBoolean, setPropertyDouble, setPropertyInt, setPropertyJSO, setPropertyObject, setPropertyString, setScrollLeft, setScrollTop, setTabIndex, setTitle
 
Methods inherited from class com.google.gwt.dom.client.Node
appendChild, cloneNode, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, hasChildNodes, hasParentElement, insertAfter, insertBefore, insertFirst, isOrHasChild, removeChild, removeFromParent, replaceChild, setNodeValue
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SVGAnimationElement

protected SVGAnimationElement()
Method Detail

getTargetElement

public final SVGElement getTargetElement()
The element which is being animated.


getStartTime

public final float getStartTime()
                         throws com.google.gwt.core.client.JavaScriptException
Returns the begin time, in seconds, for this animation element's current interval, if it exists, regardless of whether the interval has begun yet. If there is no current interval, then a DOMException with code INVALID_STATE_ERR is thrown.

Returns:
The start time, in seconds, of this animation element's current interval.
Throws:
DOMException(INVALID_STATE_ERR) - The animation element does not have a current interval.
com.google.gwt.core.client.JavaScriptException

getCurrentTime

public final float getCurrentTime()
Returns the current time in seconds relative to time zero for the given time container.

Returns:
The current time in seconds relative to time zero for the given time container.

getSimpleDuration

public final float getSimpleDuration()
                              throws com.google.gwt.core.client.JavaScriptException
Returns the number of seconds for the simple duration for this animation. If the simple duration is undefined (e.g., the end time is indefinite), then an exception is raised.

Returns:
number of seconds for the simple duration for this animation.
Throws:
DOMException(NOT_SUPPORTED_ERR) - The simple duration is not determined on the given element.
com.google.gwt.core.client.JavaScriptException

beginElement

public final void beginElement()
Creates a begin instance time for the current time. The new instance time is added to the begin instance times list. The behavior of this method is equivalent to beginElementAt(0).


beginElementAt

public final void beginElementAt(float offset)
Creates a begin instance time for the current time plus the specified offset. The new instance time is added to the begin instance times list.

Parameters:
offset - The offset from the current document time, in seconds, at which to begin the element.

endElement

public final void endElement()
Creates an end instance time for the current time. The new instance time is added to the end instance times list. The behavior of this method is equivalent to endElementAt(0).


endElementAt

public final void endElementAt(float offset)
Creates a end instance time for the current time plus the specified offset. The new instance time is added to the end instance times list.

Parameters:
offset - offset from the current document time, in seconds, at which to end the element.

getExternalResourcesRequired

public final OMSVGAnimatedBoolean getExternalResourcesRequired()
Corresponds to attribute ISVGExternalResourcesRequired.getExternalResourcesRequired() on the given element. Note that the SVG DOM defines the attribute ISVGExternalResourcesRequired.getExternalResourcesRequired() as being of type OMSVGAnimatedBoolean, whereas the SVG language definition says that ISVGExternalResourcesRequired.getExternalResourcesRequired() is not animated. Because the SVG language definition states that ISVGExternalResourcesRequired.getExternalResourcesRequired() cannot be animated, the OMSVGAnimatedBoolean.getAnimVal() will always be the same as the OMSVGAnimatedBoolean.getBaseVal().


getRequiredFeatures

public final OMSVGStringList getRequiredFeatures()
Corresponds to attribute ISVGTests.getRequiredFeatures() on the given element.


getRequiredExtensions

public final OMSVGStringList getRequiredExtensions()
Corresponds to attribute ISVGTests.getRequiredExtensions() on the given element.


getSystemLanguage

public final OMSVGStringList getSystemLanguage()
Corresponds to attribute ISVGTests.getSystemLanguage() on the given element.


hasExtension

public final boolean hasExtension(String extension)
Returns true if the user agent supports the given extension, specified by a URI.

Parameters:
extension - The name of the extension, expressed as a URI.
Returns:
True or false, depending on whether the given extension is supported.


Copyright © 2012. All Rights Reserved.