
public class JsSVGSVGElement extends JsSVGElement implements SVGSVGElement
ALLOW_KEYBOARD_INPUTATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODESVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
JsSVGSVGElement() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
animationsPaused()
Returns true if this SVG document fragment is in a paused state.
|
boolean |
checkEnclosure(SVGElement element,
SVGRect rect)
Returns true if the rendered content of the given element is entirely contained within the supplied rectangle.
|
boolean |
checkIntersection(SVGElement element,
SVGRect rect)
Returns true if the rendered content of the given element intersects the supplied rectangle.
|
JsSVGAngle |
createSVGAngle()
Creates an
SVGAngle object outside of any document trees. |
JsSVGLength |
createSVGLength()
Creates an
SVGLength object outside of any document trees. |
JsSVGMatrix |
createSVGMatrix()
Creates an
SVGMatrix object outside of any document trees. |
JsSVGNumber |
createSVGNumber()
Creates an
SVGNumber object outside of any document trees. |
JsSVGPoint |
createSVGPoint()
Creates an
SVGPoint object outside of any document trees. |
JsSVGRect |
createSVGRect()
Creates an
SVGRect object outside of any document trees. |
JsSVGTransform |
createSVGTransform()
Creates an
SVGTransform object outside of any document trees. |
JsSVGTransform |
createSVGTransformFromMatrix(SVGMatrix matrix)
Creates an
SVGTransform 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.
|
String |
getContentScriptType()
Corresponds to attribute
contentScriptType on the given <svg>
element. |
String |
getContentStyleType()
Corresponds to attribute
contentStyleType on the given <svg>
element. |
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. |
float |
getCurrentTime()
Returns the current time in seconds relative to the start time for the current SVG document fragment.
|
JsSVGPoint |
getCurrentTranslate()
On an outermost
<svg>
element, the corresponding translation factor that takes into account user "magnification". |
JsSVGViewSpec |
getCurrentView()
The definition of the initial view (i.e., before magnification and panning) of the current innermost SVG document fragment.
|
JsElement |
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.
|
JsNodeList |
getEnclosureList(SVGRect rect,
SVGElement referenceElement)
Returns the list of graphics elements whose rendered content is entirely contained within the supplied rectangle.
|
JsNodeList |
getIntersectionList(SVGRect rect,
SVGElement referenceElement)
Returns the list of graphics elements whose rendered content intersects the supplied rectangle.
|
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.
|
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.
|
JsSVGRect |
getViewport()
The position and size of the viewport (implicit or explicit) that corresponds to this
<svg>
element. |
JsSVGAnimatedLength |
getX() |
JsSVGAnimatedLength |
getY() |
boolean |
isUseCurrentView()
|
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 param_contentScriptType) |
void |
setContentStyleType(String param_contentStyleType) |
void |
setCurrentScale(float param_currentScale) |
void |
setCurrentTime(float seconds)
Adjusts the clock for this SVG document fragment, establishing a new current time.
|
int |
suspendRedraw(int maxWaitMilliseconds)
Takes a time-out value which indicates that redraw shall not occur until:
|
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. |
getOwnerSVGElement, getViewportElement, getXmlbase, setXmlbaseblur, click, focus, getAccessKey, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getBoundingClientRect, getChildren, getClassList, getClassName, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getContentEditable, getDataset, getDir, getElementsByClassName, getElementsByTagName, getElementsByTagNameNS, getId, getInnerHTML, getInnerText, getLang, getOffsetHeight, getOffsetLeft, getOffsetParent, getOffsetTop, getOffsetWidth, getOnabort, getOnbeforecopy, getOnbeforecut, getOnbeforepaste, getOnblur, getOnchange, getOnclick, getOncontextmenu, getOncopy, getOncut, getOndblclick, getOndrag, getOndragend, getOndragenter, getOndragleave, getOndragover, getOndragstart, getOndrop, getOnerror, getOnfocus, getOninput, getOninvalid, getOnkeydown, getOnkeypress, getOnkeyup, getOnload, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnmousewheel, getOnpaste, getOnreset, getOnscroll, getOnsearch, getOnselect, getOnselectstart, getOnsubmit, getOntouchcancel, getOntouchend, getOntouchmove, getOntouchstart, getOnwebkitfullscreenchange, getOnwebkitfullscreenerror, getOuterHTML, getOuterText, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getStyle, getTabIndex, getTagName, getTitle, getWebkitdropzone, getWebkitRegionOverflow, hasAttribute, hasAttributeNS, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isContentEditable, isDraggable, isHidden, isSpellcheck, isTranslate, removeAttribute, removeAttributeNode, removeAttributeNS, scrollByLines, scrollByPages, scrollIntoView, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewIfNeeded, setAccessKey, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setClassName, setContentEditable, setDir, setDraggable, setHidden, setId, setInnerHTML, setInnerText, setLang, setOnabort, setOnbeforecopy, setOnbeforecut, setOnbeforepaste, setOnblur, setOnchange, setOnclick, setOncontextmenu, setOncopy, setOncut, setOndblclick, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOnerror, setOnfocus, setOninput, setOninvalid, setOnkeydown, setOnkeypress, setOnkeyup, setOnload, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnpaste, setOnreset, setOnscroll, setOnsearch, setOnselect, setOnselectstart, setOnsubmit, setOntouchcancel, setOntouchend, setOntouchmove, setOntouchstart, setOnwebkitfullscreenchange, setOnwebkitfullscreenerror, setOuterHTML, setOuterText, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTitle, setTranslate, setWebkitdropzone, webkitMatchesSelector, webkitRequestFullscreen, webkitRequestFullScreenappendChild, cloneNode, compareDocumentPosition, contains, getAttributes, getBaseURI, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContentaddEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPanat, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAtcast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toStringgetAnimatedHeight, getAnimatedWidthgetId, getOwnerSVGElement, getViewportElement, getXmlbase, setId, setXmlbaseblur, click, focus, getAccessKey, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getBoundingClientRect, getChildElementCount, getChildren, getClassList, getClassName, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getContentEditable, getDataset, getDir, getElementsByClassName, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getInnerHTML, getInnerText, getLang, getLastElementChild, getNextElementSibling, getOffsetHeight, getOffsetLeft, getOffsetParent, getOffsetTop, getOffsetWidth, getOnabort, getOnbeforecopy, getOnbeforecut, getOnbeforepaste, getOnblur, getOnchange, getOnclick, getOncontextmenu, getOncopy, getOncut, getOndblclick, getOndrag, getOndragend, getOndragenter, getOndragleave, getOndragover, getOndragstart, getOndrop, getOnerror, getOnfocus, getOninput, getOninvalid, getOnkeydown, getOnkeypress, getOnkeyup, getOnload, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnmousewheel, getOnpaste, getOnreset, getOnscroll, getOnsearch, getOnselect, getOnselectstart, getOnsubmit, getOntouchcancel, getOntouchend, getOntouchmove, getOntouchstart, getOnwebkitfullscreenchange, getOnwebkitfullscreenerror, getOuterHTML, getOuterText, getPreviousElementSibling, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getStyle, getTabIndex, getTagName, getTitle, getWebkitdropzone, getWebkitRegionOverflow, hasAttribute, hasAttributeNS, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isContentEditable, isDraggable, isHidden, isSpellcheck, isTranslate, querySelector, querySelectorAll, removeAttribute, removeAttributeNode, removeAttributeNS, scrollByLines, scrollByPages, scrollIntoView, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewIfNeeded, setAccessKey, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setClassName, setContentEditable, setDir, setDraggable, setHidden, setInnerHTML, setInnerText, setLang, setOnabort, setOnbeforecopy, setOnbeforecut, setOnbeforepaste, setOnblur, setOnchange, setOnclick, setOncontextmenu, setOncopy, setOncut, setOndblclick, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOnerror, setOnfocus, setOninput, setOninvalid, setOnkeydown, setOnkeypress, setOnkeyup, setOnload, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnpaste, setOnreset, setOnscroll, setOnsearch, setOnselect, setOnselectstart, setOnsubmit, setOntouchcancel, setOntouchend, setOntouchmove, setOntouchstart, setOnwebkitfullscreenchange, setOnwebkitfullscreenerror, setOuterHTML, setOuterText, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTitle, setTranslate, setWebkitdropzone, webkitMatchesSelector, webkitRequestFullscreen, webkitRequestFullScreenaddEventListener, addEventListener, appendChild, cloneNode, compareDocumentPosition, contains, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, removeEventListener, removeEventListener, replaceChild, setNodeValue, setPrefix, setTextContentgetRequiredExtensions, getRequiredFeatures, getSystemLanguage, hasExtensiongetXmllang, getXmlspace, setXmllang, setXmlspacegetExternalResourcesRequiredgetAnimatedClassName, getPresentationAttribute, getSvgStylegetBBox, getCTM, getFarthestViewportElement, getNearestViewportElement, getScreenCTM, getTransformToElementgetPreserveAspectRatio, getViewBoxgetZoomAndPan, setZoomAndPanintAt, lengthnumberAtpublic final String getContentScriptType()
SVGSVGElementcontentScriptType on the given <svg>
element.getContentScriptType in interface SVGSVGElementpublic final void setContentScriptType(String param_contentScriptType)
setContentScriptType in interface SVGSVGElementpublic final String getContentStyleType()
SVGSVGElementcontentStyleType on the given <svg>
element.getContentStyleType in interface SVGSVGElementpublic final void setContentStyleType(String param_contentStyleType)
setContentStyleType in interface SVGSVGElementpublic final float getCurrentScale()
SVGSVGElement<svg>
element, this attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations. DOM attributes currentScale and currentTranslate 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).getCurrentScale in interface SVGSVGElementpublic final void setCurrentScale(float param_currentScale)
setCurrentScale in interface SVGSVGElementpublic final JsSVGPoint getCurrentTranslate()
SVGSVGElement<svg>
element, the corresponding translation factor that takes into account user "magnification".getCurrentTranslate in interface SVGSVGElementpublic final JsSVGViewSpec getCurrentView()
SVGSVGElementviewBox,
preserveAspectRatio and
zoomAndPan within
currentView will match the values for the corresponding DOM attributes that are on SVGSVGElement directlytransform and
viewTarget within
currentView will be null<view>
element, then: viewBox,
preserveAspectRatio and
zoomAndPan within
currentView will correspond to the corresponding attributes for the given <view>
elementtransform and
viewTarget within
currentView will be null<view>
), then: viewBox,
preserveAspectRatio and
zoomAndPan within
currentView will match the values for the corresponding DOM attributes that are on SVGSVGElement directly for the closest ancestor <svg>
elementtransform within
currentView will be nullviewTarget within
currentView will represent the target of the linkviewBox,
preserveAspectRatio,
zoomAndPan,
transform and
viewTarget within
currentView will correspond to the values from the SVG view specification fragment identifiergetCurrentView in interface SVGSVGElementpublic final float getPixelUnitToMillimeterX()
SVGSVGElementgetPixelUnitToMillimeterX in interface SVGSVGElementpublic final float getPixelUnitToMillimeterY()
SVGSVGElementgetPixelUnitToMillimeterY in interface SVGSVGElementpublic final float getScreenPixelToMillimeterX()
SVGSVGElementgetScreenPixelToMillimeterX in interface SVGSVGElementpublic final float getScreenPixelToMillimeterY()
SVGSVGElementgetScreenPixelToMillimeterY in interface SVGSVGElementpublic final boolean isUseCurrentView()
SVGSVGElement<svg>
element such as
viewBox) or to a "custom" view (i.e., a hyperlink into a particular <view>
or other element). 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.isUseCurrentView in interface SVGSVGElementpublic final JsSVGRect getViewport()
SVGSVGElement<svg>
element. When the browser 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.)getViewport in interface SVGSVGElementpublic final JsSVGAnimatedLength getX()
getX in interface SVGSVGElementpublic final JsSVGAnimatedLength getY()
getY in interface SVGSVGElementpublic final boolean animationsPaused()
SVGSVGElementanimationsPaused in interface SVGSVGElementpublic final boolean checkEnclosure(SVGElement element, SVGRect rect)
SVGSVGElementpointer-events processing.checkEnclosure in interface SVGSVGElementpublic final boolean checkIntersection(SVGElement element, SVGRect rect)
SVGSVGElementpointer-events processing.checkIntersection in interface SVGSVGElementpublic final JsSVGAngle createSVGAngle()
SVGSVGElementSVGAngle object outside of any document trees. The object is initialized to a value of zero degrees (unitless).createSVGAngle in interface SVGSVGElementpublic final JsSVGLength createSVGLength()
SVGSVGElementSVGLength object outside of any document trees. The object is initialized to a value of zero user units.createSVGLength in interface SVGSVGElementpublic final JsSVGMatrix createSVGMatrix()
SVGSVGElementSVGMatrix object outside of any document trees. The object is initialized to the identity matrix.createSVGMatrix in interface SVGSVGElementpublic final JsSVGNumber createSVGNumber()
SVGSVGElementSVGNumber object outside of any document trees. The object is initialized to a value of zero.createSVGNumber in interface SVGSVGElementpublic final JsSVGPoint createSVGPoint()
SVGSVGElementSVGPoint object outside of any document trees. The object is initialized to the point (0,0) in the user coordinate system.createSVGPoint in interface SVGSVGElementpublic final JsSVGRect createSVGRect()
SVGSVGElementSVGRect object outside of any document trees. The object is initialized such that all values are set to 0 user units.createSVGRect in interface SVGSVGElementpublic final JsSVGTransform createSVGTransform()
SVGSVGElementSVGTransform object outside of any document trees. The object is initialized to an identity matrix transform (SVG_TRANSFORM_MATRIX).createSVGTransform in interface SVGSVGElementpublic final JsSVGTransform createSVGTransformFromMatrix(SVGMatrix matrix)
SVGSVGElementSVGTransform 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.createSVGTransformFromMatrix in interface SVGSVGElementpublic final void deselectAll()
SVGSVGElementdeselectAll in interface SVGSVGElementpublic final void forceRedraw()
SVGSVGElementforceRedraw in interface SVGSVGElementpublic final float getCurrentTime()
SVGSVGElement<script>
element before the document's SVGLoad event is dispatched), then 0 is returned.getCurrentTime in interface SVGSVGElementpublic final JsElement getElementById(String elementId)
SVGSVGElementgetElementById in interface SVGSVGElementpublic final JsNodeList getEnclosureList(SVGRect rect, SVGElement referenceElement)
SVGSVGElementpointer-events processing.getEnclosureList in interface SVGSVGElementpublic final JsNodeList getIntersectionList(SVGRect rect, SVGElement referenceElement)
SVGSVGElementpointer-events processing.getIntersectionList in interface SVGSVGElementpublic final void pauseAnimations()
SVGSVGElement<svg>
element, causing the animation clock corresponding to this document fragment to stand still until it is unpaused.pauseAnimations in interface SVGSVGElementpublic final void setCurrentTime(float seconds)
SVGSVGElementsetCurrentTime 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.setCurrentTime in interface SVGSVGElementpublic final int suspendRedraw(int maxWaitMilliseconds)
SVGSVGElementTakes a time-out value which indicates that redraw shall not occur until:
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.
suspendRedraw in interface SVGSVGElementpublic final void unpauseAnimations()
SVGSVGElementunpauseAnimations in interface SVGSVGElementpublic final void unsuspendRedraw(int suspendHandleId)
SVGSVGElementsuspendRedraw() by providing a unique suspend handle ID that was returned by a previous suspendRedraw() call.unsuspendRedraw in interface SVGSVGElementpublic final void unsuspendRedrawAll()
SVGSVGElementsuspendRedraw() 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.unsuspendRedrawAll in interface SVGSVGElementCopyright © 2016. All rights reserved.