public class OMSVGDocument extends OMDocument implements HasDocumentHandlers
When an svg element is embedded inline as
a component of a document from another namespace, such as when an svg element is embedded inline within
an XHTML document [XHTML], then an OMSVGDocument
object will not exist; instead, the
root object in the document object hierarchy will be a Document object
of a different type, such as an HTMLDocument object.
However, an
OMSVGDocument
object will indeed exist when
the root element of the XML document hierarchy is an svg element, such as when viewing
a stand-alone SVG file (i.e., a file with MIME type "image/svg+xml"). In
this case, the OMSVGDocument
object will
be the root object of the document object model hierarchy.
In the
case where an SVG document is embedded by reference, such as when an XHTML
document has an 'object' element whose
'href' attribute references an SVG document
(i.e., a document whose MIME type is "image/svg+xml" and whose root element
is thus an svg element), there will exist two
distinct DOM hierarchies. The first DOM hierarchy will be for the referencing
document (e.g., an XHTML document). The second DOM hierarchy will be for
the referenced SVG document. In this second DOM hierarchy, the root object
of the document object model hierarchy is an OMSVGDocument
object.
The OMSVGDocument
interface
contains a similar list of attributes and methods to the HTMLDocument interface
described in the Document
Object Model (HTML) Level 1 chapter of the [DOM1]
specification.
Modifier | Constructor and Description |
---|---|
protected |
OMSVGDocument(SVGDocument ot) |
createElementNS, createTextNode, getDocument, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, importNode
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
protected OMSVGDocument(SVGDocument ot)
public final OMSVGSVGElement getRootElement()
public final com.google.gwt.event.shared.HandlerRegistration addScrollHandler(com.google.gwt.event.dom.client.ScrollHandler handler)
addScrollHandler
in interface com.google.gwt.event.dom.client.HasScrollHandlers
public final com.google.gwt.event.shared.HandlerRegistration addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler handler)
addResizeHandler
in interface com.google.gwt.event.logical.shared.HasResizeHandlers
public final com.google.gwt.event.shared.HandlerRegistration addSVGZoomHandler(SVGZoomHandler handler)
HasSVGZoomHandlers
SVGZoomHandler
handler.addSVGZoomHandler
in interface HasSVGZoomHandlers
handler
- the zoom handlerHandlerRegistration
used to remove this handlerpublic final OMSVGSVGElement createSVGSVGElement()
public final OMSVGGElement createSVGGElement()
public final OMSVGDefsElement createSVGDefsElement()
public final OMSVGDescElement createSVGDescElement()
public final OMSVGTitleElement createSVGTitleElement()
public final OMSVGSymbolElement createSVGSymbolElement()
public final OMSVGUseElement createSVGUseElement()
public final OMSVGImageElement createSVGImageElement()
public final OMSVGSwitchElement createSVGSwitchElement()
public final OMSVGStyleElement createSVGStyleElement()
public final OMSVGPathElement createSVGPathElement()
public final OMSVGRectElement createSVGRectElement()
public final OMSVGCircleElement createSVGCircleElement()
public final OMSVGEllipseElement createSVGEllipseElement()
public final OMSVGLineElement createSVGLineElement()
public final OMSVGPolylineElement createSVGPolylineElement()
public final OMSVGPolygonElement createSVGPolygonElement()
public final OMSVGTextElement createSVGTextElement()
public final OMSVGTSpanElement createSVGTSpanElement()
public final OMSVGTRefElement createSVGTRefElement()
public final OMSVGTextPathElement createSVGTextPathElement()
public final OMSVGAltGlyphElement createSVGAltGlyphElement()
public final OMSVGAltGlyphDefElement createSVGAltGlyphDefElement()
public final OMSVGAltGlyphItemElement createSVGAltGlyphItemElement()
public final OMSVGGlyphRefElement createSVGGlyphRefElement()
public final OMSVGMarkerElement createSVGMarkerElement()
public final OMSVGColorProfileElement createSVGColorProfileElement()
public final OMSVGLinearGradientElement createSVGLinearGradientElement()
public final OMSVGRadialGradientElement createSVGRadialGradientElement()
public final OMSVGStopElement createSVGStopElement()
public final OMSVGPatternElement createSVGPatternElement()
public final OMSVGClipPathElement createSVGClipPathElement()
public final OMSVGMaskElement createSVGMaskElement()
public final OMSVGFilterElement createSVGFilterElement()
public final OMSVGFEBlendElement createSVGFEBlendElement()
public final OMSVGFEColorMatrixElement createSVGFEColorMatrixElement()
public final OMSVGFEComponentTransferElement createSVGFEComponentTransferElement()
public final OMSVGFEFuncRElement createSVGFEFuncRElement()
public final OMSVGFEFuncGElement createSVGFEFuncGElement()
public final OMSVGFEFuncBElement createSVGFEFuncBElement()
public final OMSVGFEFuncAElement createSVGFEFuncAElement()
public final OMSVGFECompositeElement createSVGFECompositeElement()
public final OMSVGFEConvolveMatrixElement createSVGFEConvolveMatrixElement()
public final OMSVGFEDiffuseLightingElement createSVGFEDiffuseLightingElement()
public final OMSVGFEDistantLightElement createSVGFEDistantLightElement()
public final OMSVGFEPointLightElement createSVGFEPointLightElement()
public final OMSVGFESpotLightElement createSVGFESpotLightElement()
public final OMSVGFEDisplacementMapElement createSVGFEDisplacementMapElement()
public final OMSVGFEFloodElement createSVGFEFloodElement()
public final OMSVGFEGaussianBlurElement createSVGFEGaussianBlurElement()
public final OMSVGFEImageElement createSVGFEImageElement()
public final OMSVGFEMergeElement createSVGFEMergeElement()
public final OMSVGFEMergeNodeElement createSVGFEMergeNodeElement()
public final OMSVGFEMorphologyElement createSVGFEMorphologyElement()
public final OMSVGFEOffsetElement createSVGFEOffsetElement()
public final OMSVGFESpecularLightingElement createSVGFESpecularLightingElement()
public final OMSVGFETileElement createSVGFETileElement()
public final OMSVGFETurbulenceElement createSVGFETurbulenceElement()
public final OMSVGCursorElement createSVGCursorElement()
public final OMSVGAElement createSVGAElement()
public final OMSVGViewElement createSVGViewElement()
public final OMSVGScriptElement createSVGScriptElement()
public final OMSVGAnimateElement createSVGAnimateElement()
public final OMSVGSetElement createSVGSetElement()
public final OMSVGAnimateMotionElement createSVGAnimateMotionElement()
public final OMSVGMPathElement createSVGMPathElement()
public final OMSVGAnimateColorElement createSVGAnimateColorElement()
public final OMSVGAnimateTransformElement createSVGAnimateTransformElement()
public final OMSVGFontElement createSVGFontElement()
public final OMSVGGlyphElement createSVGGlyphElement()
public final OMSVGMissingGlyphElement createSVGMissingGlyphElement()
public final OMSVGHKernElement createSVGHKernElement()
public final OMSVGVKernElement createSVGVKernElement()
public final OMSVGFontFaceElement createSVGFontFaceElement()
public final OMSVGFontFaceSrcElement createSVGFontFaceSrcElement()
public final OMSVGFontFaceUriElement createSVGFontFaceUriElement()
public final OMSVGFontFaceFormatElement createSVGFontFaceFormatElement()
public final OMSVGFontFaceNameElement createSVGFontFaceNameElement()
public final OMSVGMetadataElement createSVGMetadataElement()
public final OMSVGForeignObjectElement createSVGForeignObjectElement()
public final OMSVGCircleElement createSVGCircleElement(float cx, float cy, float r)
OMSVGCircleElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified coordinates
and radius.cx
- the X coordinate of the circle centercy
- the Y coordinate of the circle centerr
- the circle radiusOMSVGCircleElement
object.public final OMSVGEllipseElement createSVGEllipseElement(float cx, float cy, float rx, float ry)
OMSVGEllipseElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified coordinates
and radii.cx
- the X coordinate of the ellipse centercy
- the Y coordinate of the ellipse centerrx
- the X-axis radius of the ellipsery
- the Y-axis radius of the ellipseOMSVGEllipseElement
object.public final OMSVGLineElement createSVGLineElement(float x1, float y1, float x2, float y2)
OMSVGLineElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified endpoint coordinates.x1
- the X coordinate of the first endpointy1
- the Y coordinate of the first endpointx2
- the X coordinate of the second endpointy2
- the Y coordinate of the second endpointOMSVGLineElement
object.public final OMSVGLineElement createSVGLineElement(OMSVGPoint p1, OMSVGPoint p2)
OMSVGLineElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified endpoints.p1
- the first endpointp2
- the the second endpointOMSVGLineElement
object.public final OMSVGRectElement createSVGRectElement(float x, float y, float width, float height, float rx, float ry)
OMSVGRectElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified coordinates, size and
corner radii.x
- the X coordinate of the upper left cornery
- the Y coordinate of the upper left cornerwidth
- the width of the rectangleheight
- the width of the rectanglerx
- the X-axis radius of the rectangle cornerry
- the Y-axis radius of the rectangle cornerOMSVGRectElement
object.public final OMSVGRectElement createSVGRectElement(OMSVGRect rect)
OMSVGRectElement
object in this
document but does not attach it to the document tree.
The object is initialized with the specified SVG rect and zero
corner radii.rect
- The SVG rect to use to initialize this rect.OMSVGRectElement
object.public final OMSVGTextElement createSVGTextElement(float x, float y, short unitType, String data)
OMSVGTextElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified coordinates and string data.x
- the X coordinate of the text in specified unitsy
- the Y coordinate of the text in specified unitsunitType
- the unit type used to specify the text coordinatesdata
- the string represented by the text object.OMSVGTextElement
object.public final OMSVGImageElement createSVGImageElement(float x, float y, float width, float height, String href)
OMSVGImageElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified coordinates, size and
image reference.x
- the X coordinate of the imagey
- the Y coordinate of the imagewidth
- the width of the imageheight
- the width of the imagehref
- the bitmap image referenced by this image elementOMSVGImageElement
object.public final OMSVGTitleElement createSVGTitleElement(String text)
OMSVGTitleElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified text.text
- the title textOMSVGTitleElement
object.public final OMSVGDescElement createSVGDescElement(String text)
OMSVGDescElement
object in this
document but does not attach it to the document tree.
The object is initialized to the specified text.text
- the description textOMSVGDescElement
object.Copyright © 2018. All Rights Reserved.