org.vectomatic.dom.svg
Class OMSVGSVGElement

java.lang.Object
  extended by org.vectomatic.dom.svg.OMNode
      extended by org.vectomatic.dom.svg.OMElement
          extended by org.vectomatic.dom.svg.OMSVGElement
              extended by org.vectomatic.dom.svg.OMSVGSVGElement
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllTouchHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.dom.client.HasLoadHandlers, com.google.gwt.event.dom.client.HasMouseDownHandlers, com.google.gwt.event.dom.client.HasMouseMoveHandlers, com.google.gwt.event.dom.client.HasMouseOutHandlers, com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.dom.client.HasMouseUpHandlers, com.google.gwt.event.dom.client.HasScrollHandlers, com.google.gwt.event.dom.client.HasTouchCancelHandlers, com.google.gwt.event.dom.client.HasTouchEndHandlers, com.google.gwt.event.dom.client.HasTouchMoveHandlers, com.google.gwt.event.dom.client.HasTouchStartHandlers, com.google.gwt.event.logical.shared.HasResizeHandlers, com.google.gwt.event.shared.HasHandlers, HasActivateHandlers, HasDocumentHandlers, HasFocusInHandlers, HasFocusOutHandlers, HasGraphicalHandlers, HasSVGZoomHandlers, ISVGContainerElement, ISVGExternalResourcesRequired, ISVGFitToViewBox, ISVGLangSpace, ISVGLocatable, ISVGStylable, ISVGTests, ISVGZoomAndPan

@TagName(value="svg")
public class OMSVGSVGElement
extends OMSVGElement
implements HasGraphicalHandlers, HasDocumentHandlers, ISVGTests, ISVGLangSpace, ISVGExternalResourcesRequired, ISVGStylable, ISVGLocatable, ISVGFitToViewBox, ISVGZoomAndPan, ISVGContainerElement

A key interface definition is the OMSVGSVGElement interface, which is the interface that corresponds to the svg element. This interface contains various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices.

OMSVGSVGElement extends ViewCSS and DocumentCSS to provide access to the computed values of properties and the override style sheet as described in DOM Level 2 Style [DOM2STYLE].


Field Summary
 
Fields inherited from class org.vectomatic.dom.svg.OMNode
eventBus, ot
 
Fields inherited from interface org.vectomatic.dom.svg.itf.ISVGZoomAndPan
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN
 
Constructor Summary
OMSVGSVGElement()
           
OMSVGSVGElement(SVGSVGElement ot)
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addActivateHandler(ActivateHandler handler)
          Adds a ActivateHandler handler.
 com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addFocusInHandler(FocusInHandler handler)
          Adds a FocusInHandler handler.
 com.google.gwt.event.shared.HandlerRegistration addFocusOutHandler(FocusOutHandler handler)
          Adds a FocusOutHandler handler.
 com.google.gwt.event.shared.HandlerRegistration addLoadHandler(com.google.gwt.event.dom.client.LoadHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addScrollHandler(com.google.gwt.event.dom.client.ScrollHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addSVGZoomHandler(SVGZoomHandler handler)
          Adds a SVGZoomHandler handler.
 com.google.gwt.event.shared.HandlerRegistration addTouchCancelHandler(com.google.gwt.event.dom.client.TouchCancelHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addTouchEndHandler(com.google.gwt.event.dom.client.TouchEndHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addTouchMoveHandler(com.google.gwt.event.dom.client.TouchMoveHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addTouchStartHandler(com.google.gwt.event.dom.client.TouchStartHandler handler)
           
 boolean animationsPaused()
          Returns true if this SVG document fragment is in a paused state.
 boolean checkEnclosure(OMSVGElement element, OMSVGRect rect)
          Returns true if the rendered content of the given element is entirely contained within the supplied rectangle.
 boolean checkIntersection(OMSVGElement element, OMSVGRect rect)
          Returns true if the rendered content of the given element intersects the supplied rectangle.
 OMSVGAngle createSVGAngle()
          Creates an OMSVGAngle object outside of any document trees.
 OMSVGAngle createSVGAngle(OMSVGAngle a)
          Creates an OMSVGAngle object outside of any document trees.
 OMSVGAngle createSVGAngle(short unitType, float valueInSpecifiedUnits)
          Creates an OMSVGAngle object outside of any document trees.
 OMSVGLength createSVGLength()
          Creates an OMSVGLength object outside of any document trees.
 OMSVGLength createSVGLength(OMSVGLength l)
          Creates an OMSVGLength object outside of any document trees.
 OMSVGLength createSVGLength(short unitType, float valueInSpecifiedUnits)
          Creates an OMSVGLength object outside of any document trees.
 OMSVGLength createSVGLength(com.google.gwt.dom.client.Style.Unit unitType, float valueInSpecifiedUnits)
          Creates an OMSVGLength object outside of any document trees.
 OMSVGMatrix createSVGMatrix()
          Creates an OMSVGMatrix object outside of any document trees.
 OMSVGMatrix createSVGMatrix(float a, float b, float c, float d, float e, float f)
          Creates an OMSVGMatrix object outside of any document trees.
 OMSVGMatrix createSVGMatrix(OMSVGMatrix m)
          Creates an OMSVGMatrix object outside of any document trees.
 OMSVGNumber createSVGNumber()
          Creates an OMSVGNumber object outside of any document trees.
 OMSVGNumber createSVGNumber(float value)
          Creates an OMSVGNumber object outside of any document trees.
 OMSVGPoint createSVGPoint()
          Creates an OMSVGPoint object outside of any document trees.
 OMSVGPoint createSVGPoint(float x, float y)
          Creates an OMSVGPoint object outside of any document trees.
 OMSVGPoint createSVGPoint(OMSVGPoint p)
          Creates an OMSVGPoint object outside of any document trees.
 OMSVGRect createSVGRect()
          Creates an OMSVGRect object outside of any document trees.
 OMSVGRect createSVGRect(float x, float y, float width, float height)
          Creates an OMSVGRect object outside of any document trees.
 OMSVGRect createSVGRect(OMSVGRect rect)
          Creates an OMSVGRect object outside of any document trees.
 OMSVGTransform createSVGTransform()
          Creates an OMSVGTransform object outside of any document trees.
 OMSVGTransform createSVGTransformFromMatrix(OMSVGMatrix matrix)
          

Creates an OMSVGTransform object outside of any document trees.

 void deselectAll()
          Unselects any selected objects, including any selections of text strings and type-in bars.
 void forceRedraw()
          In rendering environments supporting interactivity, forces the user agent to immediately redraw all regions of the viewport that require updating.
 OMSVGRect getBBox()
          Returns the tight bounding box in current user space (i.e., after application of the transform attribute, if any) on the geometry of all contained graphics elements, exclusive of stroking, clipping, masking and filter effects).
 String getContentScriptType()
          Corresponds to attribute getContentScriptType() on the given svg element.
 String getContentStyleType()
          Corresponds to attribute getContentStyleType() on the given svg element.
 OMSVGMatrix getCTM()
          Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the viewport coordinate system for the ISVGLocatable.getNearestViewportElement().
 float getCurrentScale()
          On an outermost svg element, this attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations, as described under Magnification and panning.
 float getCurrentTime()
          Returns the current time in seconds relative to the start time for the current SVG document fragment.
 OMSVGPoint getCurrentTranslate()
          On an outermost svg element, the corresponding translation factor that takes into account user "magnification".
 OMSVGViewSpec getCurrentView()
          The definition of the initial view (i.e., before magnification and panning) of the current innermost SVG document fragment.
 OMElement getElementById(String elementId)
          Searches this SVG document fragment (i.e., the search is restricted to a subset of the document tree) for an Element whose id is given by elementId.
 com.google.gwt.dom.client.NodeList<? extends com.google.gwt.dom.client.Node> getEnclosureList(OMSVGRect rect, OMSVGElement referenceElement)
          Returns the list of graphics elements whose rendered content is entirely contained within the supplied rectangle.
 OMSVGAnimatedBoolean getExternalResourcesRequired()
          Corresponds to attribute ISVGExternalResourcesRequired.getExternalResourcesRequired() on the given element.
 OMSVGElement getFarthestViewportElement()
          The farthest ancestor svg element.
 OMSVGAnimatedLength getHeight()
          Corresponds to attribute getHeight() on the given svg element.
 com.google.gwt.dom.client.NodeList<? extends com.google.gwt.dom.client.Node> getIntersectionList(OMSVGRect rect, OMSVGElement referenceElement)
          Returns the list of graphics elements whose rendered content intersects the supplied rectangle.
 OMSVGElement getNearestViewportElement()
          The element which established the current viewport.
 float getPixelUnitToMillimeterX()
          Size of a pixel units (as defined by CSS2) along the x-axis of the viewport, which represents a unit somewhere in the range of 70dpi to 120dpi, and, on systems that support this, might actually match the characteristics of the target medium.
 float getPixelUnitToMillimeterY()
          Corresponding size of a pixel unit along the y-axis of the viewport.
 OMSVGAnimatedPreserveAspectRatio getPreserveAspectRatio()
          Corresponds to attribute ISVGFitToViewBox.getPreserveAspectRatio() 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.
 OMSVGMatrix getScreenCTM()
          Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the parent user agent's notice of a "pixel".
 float getScreenPixelToMillimeterX()
          User interface (UI) events in DOM Level 2 indicate the screen positions at which the given UI event occurred.
 float getScreenPixelToMillimeterY()
          Corresponding size of a screen pixel along the y-axis of the viewport.
 OMSVGStringList getSystemLanguage()
          Corresponds to attribute ISVGTests.getSystemLanguage() on the given element.
 OMSVGMatrix getTransformToElement(OMSVGElement element)
          Returns the transformation matrix from the user coordinate system on the current element (after application of the transform attribute, if any) to the user coordinate system on parameter element (after application of its transform attribute, if any).
 boolean getUseCurrentView()
          The initial view (i.e., before magnification and panning) of the current innermost SVG document fragment can be either the "standard" view (i.e., based on attributes on the svg element such as svg/viewBox) or to a "custom" view (i.e., a hyperlink into a particular view or other element - see Linking into SVG content: URI fragments and SVG views).
 OMSVGAnimatedRect getViewBox()
          Corresponds to attribute ISVGFitToViewBox.getViewBox() on the given element.
 OMSVGRect getViewport()
          The position and size of the viewport (implicit or explicit) that corresponds to this svg element.
 OMSVGAnimatedLength getWidth()
          Corresponds to attribute getWidth() on the given svg element.
 OMSVGAnimatedLength getX()
          Corresponds to attribute getX() on the given svg element.
 String getXmllang()
          Corresponds to attribute xml:lang on the given element.
 String getXmlspace()
          Corresponds to attribute xml:space on the given element.
 OMSVGAnimatedLength getY()
          Corresponds to attribute getY() on the given svg element.
 short getZoomAndPan()
          Corresponds to attribute ISVGZoomAndPan.getZoomAndPan() on the given element.
 boolean hasExtension(String extension)
          Returns true if the user agent supports the given extension, specified by a URI.
 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 setContentScriptType(String value)
          Corresponds to attribute getContentScriptType() on the given svg element.
 void setContentStyleType(String value)
          Corresponds to attribute getContentStyleType() on the given svg element.
 void setCurrentScale(float value)
          On an outermost svg element, this attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations, as described under Magnification and panning.
 void setCurrentTime(float seconds)
          Adjusts the clock for this SVG document fragment, establishing a new current time.
 void setHeight(short unitType, float height)
          Sets the base value for the height of this OMSVGSVGElement to the specified value and unit type.
 void setHeight(com.google.gwt.dom.client.Style.Unit unitType, float height)
          Sets the base value for the height of this OMSVGSVGElement to the specified value and unit type.
 void setViewBox(float x, float y, float width, float height)
          Sets the base value for the viewbox of this OMSVGSVGElement to the specified coordinates and size.
 void setViewBox(OMSVGRect rect)
          Sets the base value for the viewbox of this OMSVGSVGElement to the specified rectangle.
 void setWidth(short unitType, float width)
          Sets the base value for the width of this OMSVGSVGElement to the specified value and unit type.
 void setWidth(com.google.gwt.dom.client.Style.Unit unitType, float width)
          Sets the base value for the width of this OMSVGSVGElement to the specified value and unit type.
 void setXmllang(String value)
          Corresponds to attribute xml:lang on the given element.
 void setXmlspace(String value)
          Corresponds to attribute xml:space on the given element.
 void setZoomAndPan(short value)
          Corresponds to attribute ISVGZoomAndPan.getZoomAndPan() on the given element.
 int suspendRedraw(int maxWaitMilliseconds)
          Takes a time-out value which indicates that redraw shall not occur until: the corresponding unsuspendRedraw() call has been made, an unsuspendRedrawAll() call has been made, or its timer has timed out.
 void unpauseAnimations()
          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 unsuspendRedraw(int suspendHandleID)
          Cancels a specified suspendRedraw() by providing a unique suspend handle ID that was returned by a previous suspendRedraw() call.
 void unsuspendRedrawAll()
          Cancels all currently active suspendRedraw() method calls.
 
Methods inherited from class org.vectomatic.dom.svg.OMSVGElement
addClassNameBaseVal, getClassName, getMarkup, getOwnerSVGElement, getStyle, getViewportElement, getXmlbase, removeClassNameBaseVal, replaceClassNameBaseVal, setClassNameBaseVal, setId, setXmlbase
 
Methods inherited from class org.vectomatic.dom.svg.OMElement
getAttribute, getAttributeNode, getAttributeNS, getAttributes, getElement, getElementsByTagName, getElementsByTagNameNS, getId, getTagName, hasAttribute, hasAttributeNS, removeAttribute, setAttribute, setAttributeNode, setAttributeNS
 
Methods inherited from class org.vectomatic.dom.svg.OMNode
addDomHandler, addHandler, appendChild, cleanup, cloneNode, convert, convertList, dispatch, fireEvent, getChildNodes, getEventBus, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, normalize, removeChild, replaceChild, setNodeValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface org.vectomatic.dom.svg.itf.ISVGStylable
addClassNameBaseVal, getClassName, getStyle, removeClassNameBaseVal, replaceClassNameBaseVal, setClassNameBaseVal
 

Constructor Detail

OMSVGSVGElement

public OMSVGSVGElement()

OMSVGSVGElement

public OMSVGSVGElement(SVGSVGElement ot)
Method Detail

getX

public final OMSVGAnimatedLength getX()
Corresponds to attribute getX() on the given svg element.


getY

public final OMSVGAnimatedLength getY()
Corresponds to attribute getY() on the given svg element.


getWidth

public final OMSVGAnimatedLength getWidth()
Corresponds to attribute getWidth() on the given svg element.


getHeight

public final OMSVGAnimatedLength getHeight()
Corresponds to attribute getHeight() on the given svg element.


getContentScriptType

public final String getContentScriptType()
Corresponds to attribute getContentScriptType() on the given svg element.


setContentScriptType

public final void setContentScriptType(String value)
                                throws com.google.gwt.core.client.JavaScriptException
Corresponds to attribute getContentScriptType() on the given svg element.

Throws:
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised on an attempt to change the value of a read only attribute.
com.google.gwt.core.client.JavaScriptException

getContentStyleType

public final String getContentStyleType()
Corresponds to attribute getContentStyleType() on the given svg element.


setContentStyleType

public final void setContentStyleType(String value)
                               throws com.google.gwt.core.client.JavaScriptException
Corresponds to attribute getContentStyleType() on the given svg element.

Throws:
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised on an attempt to change the value of a read only attribute.
com.google.gwt.core.client.JavaScriptException

getViewport

public final OMSVGRect getViewport()

The position and size of the viewport (implicit or explicit) that corresponds to this svg element. When the user agent is actually rendering the content, then the position and size values represent the actual values when rendering. The position and size values are unitless values in the coordinate system of the parent element. If no parent element exists (i.e., svg element represents the root of the document tree), if this SVG document is embedded as part of another document (e.g., via the HTML 'object' element), then the position and size are unitless values in the coordinate system of the parent document. (If the parent uses CSS or XSL layout, then unitless values represent pixel units for the current CSS or XSL viewport, as described in the CSS2 specification.) If the parent element does not have a coordinate system, then the user agent should provide reasonable default values for this attribute.

The OMSVGRect object is read only.


getPixelUnitToMillimeterX

public final float getPixelUnitToMillimeterX()
Size of a pixel units (as defined by CSS2) along the x-axis of the viewport, which represents a unit somewhere in the range of 70dpi to 120dpi, and, on systems that support this, might actually match the characteristics of the target medium. On systems where it is impossible to know the size of a pixel, a suitable default pixel size is provided.


getPixelUnitToMillimeterY

public final float getPixelUnitToMillimeterY()
Corresponding size of a pixel unit along the y-axis of the viewport.


getScreenPixelToMillimeterX

public final float getScreenPixelToMillimeterX()
User interface (UI) events in DOM Level 2 indicate the screen positions at which the given UI event occurred. When the user agent actually knows the physical size of a "screen unit", this attribute will express that information; otherwise, user agents will provide a suitable default value such as .28mm.


getScreenPixelToMillimeterY

public final float getScreenPixelToMillimeterY()
Corresponding size of a screen pixel along the y-axis of the viewport.


getUseCurrentView

public final boolean getUseCurrentView()
The initial view (i.e., before magnification and panning) of the current innermost SVG document fragment can be either the "standard" view (i.e., based on attributes on the svg element such as svg/viewBox) or to a "custom" view (i.e., a hyperlink into a particular view or other element - see Linking into SVG content: URI fragments and SVG views). If the initial view is the "standard" view, then this attribute is false. If the initial view is a "custom" view, then this attribute is true.


getCurrentView

public final OMSVGViewSpec getCurrentView()

The definition of the initial view (i.e., before magnification and panning) of the current innermost SVG document fragment. The meaning depends on the situation:

The object itself and its contents are both read only.


getCurrentScale

public final float getCurrentScale()
On an outermost svg element, this attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations, as described under Magnification and panning. DOM attributes getCurrentScale() and getCurrentTranslate() are equivalent to the 2x3 matrix [a b c d e f] = [currentScale 0 0 currentScale currentTranslate.x currentTranslate.y]. If "magnification" is enabled (i.e., zoomAndPan="magnify"), then the effect is as if an extra transformation were placed at the outermost level on the SVG document fragment (i.e., outside the outermost svg element).

When accessed on an svg element that is not an outermost svg element, it is undefined what behavior this attribute has.


setCurrentScale

public final void setCurrentScale(float value)
On an outermost svg element, this attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations, as described under Magnification and panning. DOM attributes getCurrentScale() and getCurrentTranslate() are equivalent to the 2x3 matrix [a b c d e f] = [currentScale 0 0 currentScale currentTranslate.x currentTranslate.y]. If "magnification" is enabled (i.e., zoomAndPan="magnify"), then the effect is as if an extra transformation were placed at the outermost level on the SVG document fragment (i.e., outside the outermost svg element).

When accessed on an svg element that is not an outermost svg element, it is undefined what behavior this attribute has.


getCurrentTranslate

public final OMSVGPoint getCurrentTranslate()
On an outermost svg element, the corresponding translation factor that takes into account user "magnification".

When accessed on an svg element that is not an outermost svg element, it is undefined what behavior this attribute has.


suspendRedraw

public final int suspendRedraw(int maxWaitMilliseconds)
Takes a time-out value which indicates that redraw shall not occur until:
  1. the corresponding unsuspendRedraw() call has been made,
  2. an unsuspendRedrawAll() call has been made, or
  3. its timer has timed out.

In environments that do not support interactivity (e.g., print media), then redraw shall not be suspended. Calls to suspendRedraw() and unsuspendRedraw() should, but need not be, made in balanced pairs.

To suspend redraw actions as a collection of SVG DOM changes occur, precede the changes to the SVG DOM with a method call similar to:

suspendHandleID
 = suspendRedraw(maxWaitMilliseconds);

and follow the changes with a method call similar to:

unsuspendRedraw(suspendHandleID);

Note that multiple suspendRedraw calls can be used at once and that each such method call is treated independently of the other suspendRedraw method calls.

Parameters:
maxWaitMilliseconds - The amount of time in milliseconds to hold off before redrawing the device. Values greater than 60 seconds will be truncated down to 60 seconds.
Returns:
A number which acts as a unique identifier for the given suspendRedraw() call. This value must be passed as the parameter to the corresponding unsuspendRedraw() method call.

unsuspendRedraw

public final void unsuspendRedraw(int suspendHandleID)
Cancels a specified suspendRedraw() by providing a unique suspend handle ID that was returned by a previous suspendRedraw() call.

Parameters:
suspendHandleID - A number which acts as a unique identifier for the desired suspendRedraw() call. The number supplied must be a value returned from a previous call to suspendRedraw(). If an invalid handle ID value is provided then the request to unsuspendRedraw() is silently ignored.

unsuspendRedrawAll

public final void unsuspendRedrawAll()
Cancels all currently active suspendRedraw() method calls. This method is most useful at the very end of a set of SVG DOM calls to ensure that all pending suspendRedraw() method calls have been cancelled.


forceRedraw

public final void forceRedraw()
In rendering environments supporting interactivity, forces the user agent to immediately redraw all regions of the viewport that require updating.


pauseAnimations

public final 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.


unpauseAnimations

public final void unpauseAnimations()
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 final boolean animationsPaused()
Returns true if this SVG document fragment is in a paused state.

Returns:
Boolean indicating whether this SVG document fragment is in a paused state.

getCurrentTime

public final float getCurrentTime()
Returns the current time in seconds relative to the start time for the current SVG document fragment. If getCurrentTime is called before the document timeline has begun (for example, by script running in a script element before the document's SVGLoad event is dispatched), then 0 is returned.

Returns:
The current time in seconds, or 0 if the document timeline has not yet begun.

setCurrentTime

public final void setCurrentTime(float seconds)
Adjusts the clock for this SVG document fragment, establishing a new current time. If setCurrentTime is called before the document timeline has begun (for example, by script running in a script element before the document's SVGLoad event is dispatched), then the value of seconds in the last invocation of the method gives the time that the document will seek to once the document timeline has begun.

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

getIntersectionList

public final com.google.gwt.dom.client.NodeList<? extends com.google.gwt.dom.client.Node> getIntersectionList(OMSVGRect rect,
                                                                                                              OMSVGElement referenceElement)
Returns the list of graphics elements whose rendered content intersects the supplied rectangle. Each candidate graphics element is to be considered a match only if the same graphics element can be a target of pointer events as defined in pointer-events processing.

Parameters:
rect - The test rectangle. The values are in the initial coordinate system for the current svg element.
referenceElement - If not null, then any intersected element that doesn't have the referenceElement as ancestor must not be included in the returned NodeList.
Returns:
A list of Elements whose content intersects the supplied rectangle. This NodeList must be implemented identically to the NodeList interface as defined in DOM Level 2 Core ([DOM2], section 1.2) with the exception that the interface is not live.

getEnclosureList

public final com.google.gwt.dom.client.NodeList<? extends com.google.gwt.dom.client.Node> getEnclosureList(OMSVGRect rect,
                                                                                                           OMSVGElement referenceElement)
Returns the list of graphics elements whose rendered content is entirely contained within the supplied rectangle. Each candidate graphics element is to be considered a match only if the same graphics element can be a target of pointer events as defined in pointer-events processing.

Parameters:
rect - The test rectangle. The values are in the initial coordinate system for the current svg element.
referenceElement - If not null, then any intersected element that doesn't have the referenceElement as ancestor must not be included in the returned NodeList.
Returns:
A list of Elements whose content is enclosed by the supplied rectangle. This NodeList must be implemented identically to the NodeList interface as defined in DOM Level 2 Core ([DOM2], section 1.2) with the exception that the interface is not live.

checkIntersection

public final boolean checkIntersection(OMSVGElement element,
                                       OMSVGRect rect)
Returns true if the rendered content of the given element intersects the supplied rectangle. Each candidate graphics element is to be considered a match only if the same graphics element can be a target of pointer events as defined in pointer-events processing.

Parameters:
element - The element on which to perform the given test.
rect - The test rectangle. The values are in the initial coordinate system for the current svg element.
Returns:
True or false, depending on whether the given element intersects the supplied rectangle.

checkEnclosure

public final boolean checkEnclosure(OMSVGElement element,
                                    OMSVGRect rect)
Returns true if the rendered content of the given element is entirely contained within the supplied rectangle. Each candidate graphics element is to be considered a match only if the same graphics element can be a target of pointer events as defined in pointer-events processing.

Parameters:
element - The element on which to perform the given test.
rect - The test rectangle. The values are in the initial coordinate system for the current svg element.
Returns:
True or false, depending on whether the given element is enclosed by the supplied rectangle.

deselectAll

public final void deselectAll()
Unselects any selected objects, including any selections of text strings and type-in bars.


createSVGNumber

public final OMSVGNumber createSVGNumber()
Creates an OMSVGNumber object outside of any document trees. The object is initialized to a value of zero.

Returns:
An OMSVGNumber object.

createSVGLength

public final OMSVGLength createSVGLength()
Creates an OMSVGLength object outside of any document trees. The object is initialized to the value of 0 user units.

Returns:
An OMSVGLength object.

createSVGAngle

public final OMSVGAngle createSVGAngle()
Creates an OMSVGAngle object outside of any document trees. The object is initialized to the value 0 degrees (unitless).

Returns:
An OMSVGAngle object.

createSVGPoint

public final OMSVGPoint createSVGPoint()
Creates an OMSVGPoint object outside of any document trees. The object is initialized to the point (0,0) in the user coordinate system.

Returns:
An OMSVGPoint object.

createSVGMatrix

public final OMSVGMatrix createSVGMatrix()
Creates an OMSVGMatrix object outside of any document trees. The object is initialized to the identity matrix.

Returns:
An OMSVGMatrix object.

createSVGRect

public final OMSVGRect createSVGRect()
Creates an OMSVGRect object outside of any document trees. The object is initialized such that all values are set to 0 user units.

Returns:
An OMSVGRect object.

createSVGTransform

public final OMSVGTransform createSVGTransform()
Creates an OMSVGTransform object outside of any document trees. The object is initialized to an identity matrix transform (SVG_TRANSFORM_MATRIX).

Returns:
An OMSVGTransform object.

createSVGTransformFromMatrix

public final OMSVGTransform createSVGTransformFromMatrix(OMSVGMatrix matrix)

Creates an OMSVGTransform object outside of any document trees. The object is initialized to the given matrix transform (i.e., SVG_TRANSFORM_MATRIX). The values from the parameter matrix are copied, the matrix parameter is not adopted as SVGTransform::matrix.

Parameters:
matrix - The transform matrix.
Returns:
An OMSVGTransform object.

getElementById

public final OMElement getElementById(String elementId)
Searches this SVG document fragment (i.e., the search is restricted to a subset of the document tree) for an Element whose id is given by elementId. If an Element is found, that Element is returned. If no such element exists, returns null. Behavior is not defined if more than one element has this id.

Parameters:
elementId - The unique id value for an element.
Returns:
The matching 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().

Specified by:
getExternalResourcesRequired in interface ISVGExternalResourcesRequired

getViewBox

public final OMSVGAnimatedRect getViewBox()
Corresponds to attribute ISVGFitToViewBox.getViewBox() on the given element.

Specified by:
getViewBox in interface ISVGFitToViewBox

getPreserveAspectRatio

public final OMSVGAnimatedPreserveAspectRatio getPreserveAspectRatio()
Corresponds to attribute ISVGFitToViewBox.getPreserveAspectRatio() on the given element.

Specified by:
getPreserveAspectRatio in interface ISVGFitToViewBox

getXmllang

public final String getXmllang()
Corresponds to attribute xml:lang on the given element.

Specified by:
getXmllang in interface ISVGLangSpace

setXmllang

public final void setXmllang(String value)
                      throws com.google.gwt.core.client.JavaScriptException
Corresponds to attribute xml:lang on the given element.

Specified by:
setXmllang in interface ISVGLangSpace
Throws:
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised on an attempt to change the value of a read only attribute.
com.google.gwt.core.client.JavaScriptException

getXmlspace

public final String getXmlspace()
Corresponds to attribute xml:space on the given element.

Specified by:
getXmlspace in interface ISVGLangSpace

setXmlspace

public final void setXmlspace(String value)
                       throws com.google.gwt.core.client.JavaScriptException
Corresponds to attribute xml:space on the given element.

Specified by:
setXmlspace in interface ISVGLangSpace
Throws:
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised on an attempt to change the value of a read only attribute.
com.google.gwt.core.client.JavaScriptException

getNearestViewportElement

public final OMSVGElement getNearestViewportElement()
The element which established the current viewport. Often, the nearest ancestor svg element. Null if the current element is the outermost svg element.

Specified by:
getNearestViewportElement in interface ISVGLocatable

getFarthestViewportElement

public final OMSVGElement getFarthestViewportElement()
The farthest ancestor svg element. Null if the current element is the outermost svg element.

Specified by:
getFarthestViewportElement in interface ISVGLocatable

getBBox

public final OMSVGRect getBBox()
Returns the tight bounding box in current user space (i.e., after application of the transform attribute, if any) on the geometry of all contained graphics elements, exclusive of stroking, clipping, masking and filter effects). Note that getBBox must return the actual bounding box at the time the method was called, even in case the element has not yet been rendered.

Specified by:
getBBox in interface ISVGLocatable
Returns:
An OMSVGRect object that defines the bounding box.

getCTM

public final OMSVGMatrix getCTM()
Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the viewport coordinate system for the ISVGLocatable.getNearestViewportElement().

Specified by:
getCTM in interface ISVGLocatable
Returns:
An OMSVGMatrix object that defines the CTM.

getScreenCTM

public final OMSVGMatrix getScreenCTM()
Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the parent user agent's notice of a "pixel". For display devices, ideally this represents a physical screen pixel. For other devices or environments where physical pixel sizes are not known, then an algorithm similar to the CSS2 definition of a "pixel" can be used instead. Note that null is returned if this element is not hooked into the document tree. This method would have been more aptly named as getClientCTM, but the name getScreenCTM is kept for historical reasons.

Specified by:
getScreenCTM in interface ISVGLocatable
Returns:
An OMSVGMatrix object that defines the given transformation matrix.

getTransformToElement

public final OMSVGMatrix getTransformToElement(OMSVGElement element)
                                        throws com.google.gwt.core.client.JavaScriptException
Returns the transformation matrix from the user coordinate system on the current element (after application of the transform attribute, if any) to the user coordinate system on parameter element (after application of its transform attribute, if any).

Specified by:
getTransformToElement in interface ISVGLocatable
Parameters:
element - The target element.
Returns:
An OMSVGMatrix object that defines the transformation.
Throws:
SVGException(SVG_MATRIX_NOT_INVERTABLE) - Raised if the currently defined transformation matrices make it impossible to compute the given matrix (e.g., because one of the transformations is singular).
com.google.gwt.core.client.JavaScriptException

getRequiredFeatures

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

Specified by:
getRequiredFeatures in interface ISVGTests

getRequiredExtensions

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

Specified by:
getRequiredExtensions in interface ISVGTests

getSystemLanguage

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

Specified by:
getSystemLanguage in interface ISVGTests

hasExtension

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

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

getZoomAndPan

public final short getZoomAndPan()
Corresponds to attribute ISVGZoomAndPan.getZoomAndPan() on the given element. The value must be one of the SVG_ZOOMANDPAN_ constants defined on this interface.

Specified by:
getZoomAndPan in interface ISVGZoomAndPan

setZoomAndPan

public final void setZoomAndPan(short value)
                         throws com.google.gwt.core.client.JavaScriptException
Corresponds to attribute ISVGZoomAndPan.getZoomAndPan() on the given element. The value must be one of the SVG_ZOOMANDPAN_ constants defined on this interface.

Specified by:
setZoomAndPan in interface ISVGZoomAndPan
Throws:
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised on an attempt to change the value of a read only attribute.
com.google.gwt.core.client.JavaScriptException

addClickHandler

public final com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
Specified by:
addClickHandler in interface com.google.gwt.event.dom.client.HasClickHandlers

addLoadHandler

public final com.google.gwt.event.shared.HandlerRegistration addLoadHandler(com.google.gwt.event.dom.client.LoadHandler handler)
Specified by:
addLoadHandler in interface com.google.gwt.event.dom.client.HasLoadHandlers

addMouseDownHandler

public final com.google.gwt.event.shared.HandlerRegistration addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler handler)
Specified by:
addMouseDownHandler in interface com.google.gwt.event.dom.client.HasMouseDownHandlers

addMouseMoveHandler

public final com.google.gwt.event.shared.HandlerRegistration addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler handler)
Specified by:
addMouseMoveHandler in interface com.google.gwt.event.dom.client.HasMouseMoveHandlers

addMouseOutHandler

public final com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler)
Specified by:
addMouseOutHandler in interface com.google.gwt.event.dom.client.HasMouseOutHandlers

addMouseOverHandler

public final com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler)
Specified by:
addMouseOverHandler in interface com.google.gwt.event.dom.client.HasMouseOverHandlers

addMouseUpHandler

public final com.google.gwt.event.shared.HandlerRegistration addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler handler)
Specified by:
addMouseUpHandler in interface com.google.gwt.event.dom.client.HasMouseUpHandlers

addScrollHandler

public final com.google.gwt.event.shared.HandlerRegistration addScrollHandler(com.google.gwt.event.dom.client.ScrollHandler handler)
Specified by:
addScrollHandler in interface com.google.gwt.event.dom.client.HasScrollHandlers

addTouchCancelHandler

public final com.google.gwt.event.shared.HandlerRegistration addTouchCancelHandler(com.google.gwt.event.dom.client.TouchCancelHandler handler)
Specified by:
addTouchCancelHandler in interface com.google.gwt.event.dom.client.HasTouchCancelHandlers

addTouchEndHandler

public final com.google.gwt.event.shared.HandlerRegistration addTouchEndHandler(com.google.gwt.event.dom.client.TouchEndHandler handler)
Specified by:
addTouchEndHandler in interface com.google.gwt.event.dom.client.HasTouchEndHandlers

addTouchMoveHandler

public final com.google.gwt.event.shared.HandlerRegistration addTouchMoveHandler(com.google.gwt.event.dom.client.TouchMoveHandler handler)
Specified by:
addTouchMoveHandler in interface com.google.gwt.event.dom.client.HasTouchMoveHandlers

addTouchStartHandler

public final com.google.gwt.event.shared.HandlerRegistration addTouchStartHandler(com.google.gwt.event.dom.client.TouchStartHandler handler)
Specified by:
addTouchStartHandler in interface com.google.gwt.event.dom.client.HasTouchStartHandlers

addResizeHandler

public final com.google.gwt.event.shared.HandlerRegistration addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler handler)
Specified by:
addResizeHandler in interface com.google.gwt.event.logical.shared.HasResizeHandlers

addActivateHandler

public final com.google.gwt.event.shared.HandlerRegistration addActivateHandler(ActivateHandler handler)
Description copied from interface: HasActivateHandlers
Adds a ActivateHandler handler.

Specified by:
addActivateHandler in interface HasActivateHandlers
Parameters:
handler - the activate handler
Returns:
HandlerRegistration used to remove this handler

addFocusInHandler

public final com.google.gwt.event.shared.HandlerRegistration addFocusInHandler(FocusInHandler handler)
Description copied from interface: HasFocusInHandlers
Adds a FocusInHandler handler.

Specified by:
addFocusInHandler in interface HasFocusInHandlers
Parameters:
handler - the focusin handler
Returns:
HandlerRegistration used to remove this handler

addFocusOutHandler

public final com.google.gwt.event.shared.HandlerRegistration addFocusOutHandler(FocusOutHandler handler)
Description copied from interface: HasFocusOutHandlers
Adds a FocusOutHandler handler.

Specified by:
addFocusOutHandler in interface HasFocusOutHandlers
Parameters:
handler - the focusout handler
Returns:
HandlerRegistration used to remove this handler

addSVGZoomHandler

public final com.google.gwt.event.shared.HandlerRegistration addSVGZoomHandler(SVGZoomHandler handler)
Description copied from interface: HasSVGZoomHandlers
Adds a SVGZoomHandler handler.

Specified by:
addSVGZoomHandler in interface HasSVGZoomHandlers
Parameters:
handler - the zoom handler
Returns:
HandlerRegistration used to remove this handler

createSVGNumber

public final OMSVGNumber createSVGNumber(float value)
Creates an OMSVGNumber object outside of any document trees. The object is initialized to the specified value.

Parameters:
value - the value to use for initialization
Returns:
An OMSVGNumber object.

createSVGLength

public final OMSVGLength createSVGLength(short unitType,
                                         float valueInSpecifiedUnits)
Creates an OMSVGLength object outside of any document trees. The object is initialized to the specified value and unit type.

Parameters:
unitType - the unit type to use for initialization
valueInSpecifiedUnits - the value to use for initialization, in the specified units
Returns:
An OMSVGLength object.

createSVGLength

public final OMSVGLength createSVGLength(com.google.gwt.dom.client.Style.Unit unitType,
                                         float valueInSpecifiedUnits)
Creates an OMSVGLength object outside of any document trees. The object is initialized to the specified value and unit type.

Parameters:
unitType - the unit type to use for initialization
valueInSpecifiedUnits - the value to use for initialization, in the specified units
Returns:
An OMSVGLength object.

createSVGLength

public final OMSVGLength createSVGLength(OMSVGLength l)
Creates an OMSVGLength object outside of any document trees. The object is initialized to the specified length.

Parameters:
l - the length to use for initialization
Returns:
An OMSVGLength object.

createSVGAngle

public final OMSVGAngle createSVGAngle(short unitType,
                                       float valueInSpecifiedUnits)
Creates an OMSVGAngle object outside of any document trees. The object is initialized to the specified value and unit type.

Parameters:
unitType - the unit type to use for initialization
valueInSpecifiedUnits - the value to use for initialization, in the specified units
Returns:
An OMSVGAngle object.

createSVGAngle

public final OMSVGAngle createSVGAngle(OMSVGAngle a)
Creates an OMSVGAngle object outside of any document trees. The object is initialized to the specified angle.

Parameters:
a - the angle to use for initialization
Returns:
An OMSVGAngle object.

createSVGPoint

public final OMSVGPoint createSVGPoint(float x,
                                       float y)
Creates an OMSVGPoint object outside of any document trees. The object is initialized to the specified coordinates.

Parameters:
x - the X coordinate to use for initialization
y - the Y coordinate to use for initialization
Returns:
An OMSVGPoint object.

createSVGPoint

public final OMSVGPoint createSVGPoint(OMSVGPoint p)
Creates an OMSVGPoint object outside of any document trees. The object is initialized to the specified point.

Parameters:
p - the point to use for initialization
Returns:
An OMSVGPoint object.

createSVGMatrix

public final OMSVGMatrix createSVGMatrix(float a,
                                         float b,
                                         float c,
                                         float d,
                                         float e,
                                         float f)
Creates an OMSVGMatrix object outside of any document trees. The object is initialized to the specified components.

Parameters:
a - the A component to use for initialization
b - the B component to use for initialization
c - the C component to use for initialization
d - the D component to use for initialization
e - the E component to use for initialization
f - the F component to use for initialization
Returns:
An OMSVGMatrix object.

createSVGMatrix

public final OMSVGMatrix createSVGMatrix(OMSVGMatrix m)
Creates an OMSVGMatrix object outside of any document trees. The object is initialized to the specified matrix.

Parameters:
m - the matrix to use for initialization
Returns:
An OMSVGMatrix object.

createSVGRect

public final OMSVGRect createSVGRect(float x,
                                     float y,
                                     float width,
                                     float height)
Creates an OMSVGRect object outside of any document trees. The object is initialized to the specified coordinates and size.

Parameters:
x - the X coordinate to use for initialization
y - the Y coordinate to use for initialization
width - the width to use for initialization
height - the height to use for initialization
Returns:
An OMSVGRect object.

createSVGRect

public final OMSVGRect createSVGRect(OMSVGRect rect)
Creates an OMSVGRect object outside of any document trees. The object is initialized to the specified rectangle.

Parameters:
rect - the rect to use for initialization
Returns:
An OMSVGRect object.

setHeight

public final void setHeight(short unitType,
                            float height)
Sets the base value for the height of this OMSVGSVGElement to the specified value and unit type.

Parameters:
unitType - the unit type in which the height is specified
height - the height in the specified units

setHeight

public final void setHeight(com.google.gwt.dom.client.Style.Unit unitType,
                            float height)
Sets the base value for the height of this OMSVGSVGElement to the specified value and unit type.

Parameters:
unitType - the unit type in which the height is specified
height - the height in the specified units

setViewBox

public final void setViewBox(OMSVGRect rect)
Sets the base value for the viewbox of this OMSVGSVGElement to the specified rectangle.

Parameters:
rect - the rectangle used to specify the viewbox

setViewBox

public final void setViewBox(float x,
                             float y,
                             float width,
                             float height)
Sets the base value for the viewbox of this OMSVGSVGElement to the specified coordinates and size.

Parameters:
x - the X coordinate to use for the viewbox
y - the Y coordinate to use for the viewbox
width - the width to use for the viewbox
height - the height to use for the viewbox

setWidth

public final void setWidth(short unitType,
                           float width)
Sets the base value for the width of this OMSVGSVGElement to the specified value and unit type.

Parameters:
unitType - the unit type in which the width is specified
width - the width in the specified units

setWidth

public final void setWidth(com.google.gwt.dom.client.Style.Unit unitType,
                           float width)
Sets the base value for the width of this OMSVGSVGElement to the specified value and unit type.

Parameters:
unitType - the unit type in which the width is specified
width - the width in the specified units


Copyright © 2012. All Rights Reserved.