org.vectomatic.dom.svg
Class OMSVGDocument

java.lang.Object
  extended by org.vectomatic.dom.svg.OMNode
      extended by org.vectomatic.dom.svg.OMDocument
          extended by org.vectomatic.dom.svg.OMSVGDocument
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasScrollHandlers, com.google.gwt.event.logical.shared.HasResizeHandlers, com.google.gwt.event.shared.HasHandlers, HasDocumentHandlers, HasSVGZoomHandlers

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.


Field Summary
 
Fields inherited from class org.vectomatic.dom.svg.OMNode
eventBus, ot
 
Constructor Summary
protected OMSVGDocument(SVGDocument ot)
           
 
Method Summary
 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.
 OMSVGAElement createSVGAElement()
           
 OMSVGAltGlyphDefElement createSVGAltGlyphDefElement()
           
 OMSVGAltGlyphElement createSVGAltGlyphElement()
           
 OMSVGAltGlyphItemElement createSVGAltGlyphItemElement()
           
 OMSVGAnimateColorElement createSVGAnimateColorElement()
           
 OMSVGAnimateElement createSVGAnimateElement()
           
 OMSVGAnimateMotionElement createSVGAnimateMotionElement()
           
 OMSVGAnimateTransformElement createSVGAnimateTransformElement()
           
 OMSVGCircleElement createSVGCircleElement()
           
 OMSVGCircleElement createSVGCircleElement(float cx, float cy, float r)
          Creates an OMSVGCircleElement object in this document but does not attach it to the document tree.
 OMSVGClipPathElement createSVGClipPathElement()
           
 OMSVGColorProfileElement createSVGColorProfileElement()
           
 OMSVGCursorElement createSVGCursorElement()
           
 OMSVGDefsElement createSVGDefsElement()
           
 OMSVGDescElement createSVGDescElement()
           
 OMSVGDescElement createSVGDescElement(String text)
          Creates an OMSVGDescElement object in this document but does not attach it to the document tree.
 OMSVGEllipseElement createSVGEllipseElement()
           
 OMSVGEllipseElement createSVGEllipseElement(float cx, float cy, float rx, float ry)
          Creates an OMSVGEllipseElement object in this document but does not attach it to the document tree.
 OMSVGFEBlendElement createSVGFEBlendElement()
           
 OMSVGFEColorMatrixElement createSVGFEColorMatrixElement()
           
 OMSVGFEComponentTransferElement createSVGFEComponentTransferElement()
           
 OMSVGFECompositeElement createSVGFECompositeElement()
           
 OMSVGFEConvolveMatrixElement createSVGFEConvolveMatrixElement()
           
 OMSVGFEDiffuseLightingElement createSVGFEDiffuseLightingElement()
           
 OMSVGFEDisplacementMapElement createSVGFEDisplacementMapElement()
           
 OMSVGFEDistantLightElement createSVGFEDistantLightElement()
           
 OMSVGFEFloodElement createSVGFEFloodElement()
           
 OMSVGFEFuncAElement createSVGFEFuncAElement()
           
 OMSVGFEFuncBElement createSVGFEFuncBElement()
           
 OMSVGFEFuncGElement createSVGFEFuncGElement()
           
 OMSVGFEFuncRElement createSVGFEFuncRElement()
           
 OMSVGFEGaussianBlurElement createSVGFEGaussianBlurElement()
           
 OMSVGFEImageElement createSVGFEImageElement()
           
 OMSVGFEMergeElement createSVGFEMergeElement()
           
 OMSVGFEMergeNodeElement createSVGFEMergeNodeElement()
           
 OMSVGFEMorphologyElement createSVGFEMorphologyElement()
           
 OMSVGFEOffsetElement createSVGFEOffsetElement()
           
 OMSVGFEPointLightElement createSVGFEPointLightElement()
           
 OMSVGFESpecularLightingElement createSVGFESpecularLightingElement()
           
 OMSVGFESpotLightElement createSVGFESpotLightElement()
           
 OMSVGFETileElement createSVGFETileElement()
           
 OMSVGFETurbulenceElement createSVGFETurbulenceElement()
           
 OMSVGFilterElement createSVGFilterElement()
           
 OMSVGFontElement createSVGFontElement()
           
 OMSVGFontFaceElement createSVGFontFaceElement()
           
 OMSVGFontFaceFormatElement createSVGFontFaceFormatElement()
           
 OMSVGFontFaceNameElement createSVGFontFaceNameElement()
           
 OMSVGFontFaceSrcElement createSVGFontFaceSrcElement()
           
 OMSVGFontFaceUriElement createSVGFontFaceUriElement()
           
 OMSVGForeignObjectElement createSVGForeignObjectElement()
           
 OMSVGGElement createSVGGElement()
           
 OMSVGGlyphElement createSVGGlyphElement()
           
 OMSVGGlyphRefElement createSVGGlyphRefElement()
           
 OMSVGHKernElement createSVGHKernElement()
           
 OMSVGImageElement createSVGImageElement()
           
 OMSVGImageElement createSVGImageElement(float x, float y, float width, float height, String href)
          Creates an OMSVGImageElement object in this document but does not attach it to the document tree.
 OMSVGLinearGradientElement createSVGLinearGradientElement()
           
 OMSVGLineElement createSVGLineElement()
           
 OMSVGLineElement createSVGLineElement(float x1, float y1, float x2, float y2)
          Creates an OMSVGLineElement object in this document but does not attach it to the document tree.
 OMSVGLineElement createSVGLineElement(OMSVGPoint p1, OMSVGPoint p2)
          Creates an OMSVGLineElement object in this document but does not attach it to the document tree.
 OMSVGMarkerElement createSVGMarkerElement()
           
 OMSVGMaskElement createSVGMaskElement()
           
 OMSVGMetadataElement createSVGMetadataElement()
           
 OMSVGMissingGlyphElement createSVGMissingGlyphElement()
           
 OMSVGMPathElement createSVGMPathElement()
           
 OMSVGPathElement createSVGPathElement()
           
 OMSVGPatternElement createSVGPatternElement()
           
 OMSVGPolygonElement createSVGPolygonElement()
           
 OMSVGPolylineElement createSVGPolylineElement()
           
 OMSVGRadialGradientElement createSVGRadialGradientElement()
           
 OMSVGRectElement createSVGRectElement()
           
 OMSVGRectElement createSVGRectElement(float x, float y, float width, float height, float rx, float ry)
          Creates an OMSVGRectElement object in this document but does not attach it to the document tree.
 OMSVGRectElement createSVGRectElement(OMSVGRect rect)
          Creates an OMSVGRectElement object in this document but does not attach it to the document tree.
 OMSVGScriptElement createSVGScriptElement()
           
 OMSVGSetElement createSVGSetElement()
           
 OMSVGStopElement createSVGStopElement()
           
 OMSVGStyleElement createSVGStyleElement()
           
 OMSVGSVGElement createSVGSVGElement()
           
 OMSVGSwitchElement createSVGSwitchElement()
           
 OMSVGSymbolElement createSVGSymbolElement()
           
 OMSVGTextElement createSVGTextElement()
           
 OMSVGTextElement createSVGTextElement(float x, float y, short unitType, String data)
          Creates an OMSVGTextElement object in this document but does not attach it to the document tree.
 OMSVGTextPathElement createSVGTextPathElement()
           
 OMSVGTitleElement createSVGTitleElement()
           
 OMSVGTitleElement createSVGTitleElement(String text)
          Creates an OMSVGTitleElement object in this document but does not attach it to the document tree.
 OMSVGTRefElement createSVGTRefElement()
           
 OMSVGTSpanElement createSVGTSpanElement()
           
 OMSVGUseElement createSVGUseElement()
           
 OMSVGViewElement createSVGViewElement()
           
 OMSVGVKernElement createSVGVKernElement()
           
 OMSVGSVGElement getRootElement()
          The root svg in the document hierarchy.
 
Methods inherited from class org.vectomatic.dom.svg.OMDocument
createElementNS, createTextNode, getDocument, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, importNode
 
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
 

Constructor Detail

OMSVGDocument

protected OMSVGDocument(SVGDocument ot)
Method Detail

getRootElement

public final OMSVGSVGElement getRootElement()
The root svg in the document hierarchy.


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

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

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

createSVGSVGElement

public final OMSVGSVGElement createSVGSVGElement()

createSVGGElement

public final OMSVGGElement createSVGGElement()

createSVGDefsElement

public final OMSVGDefsElement createSVGDefsElement()

createSVGDescElement

public final OMSVGDescElement createSVGDescElement()

createSVGTitleElement

public final OMSVGTitleElement createSVGTitleElement()

createSVGSymbolElement

public final OMSVGSymbolElement createSVGSymbolElement()

createSVGUseElement

public final OMSVGUseElement createSVGUseElement()

createSVGImageElement

public final OMSVGImageElement createSVGImageElement()

createSVGSwitchElement

public final OMSVGSwitchElement createSVGSwitchElement()

createSVGStyleElement

public final OMSVGStyleElement createSVGStyleElement()

createSVGPathElement

public final OMSVGPathElement createSVGPathElement()

createSVGRectElement

public final OMSVGRectElement createSVGRectElement()

createSVGCircleElement

public final OMSVGCircleElement createSVGCircleElement()

createSVGEllipseElement

public final OMSVGEllipseElement createSVGEllipseElement()

createSVGLineElement

public final OMSVGLineElement createSVGLineElement()

createSVGPolylineElement

public final OMSVGPolylineElement createSVGPolylineElement()

createSVGPolygonElement

public final OMSVGPolygonElement createSVGPolygonElement()

createSVGTextElement

public final OMSVGTextElement createSVGTextElement()

createSVGTSpanElement

public final OMSVGTSpanElement createSVGTSpanElement()

createSVGTRefElement

public final OMSVGTRefElement createSVGTRefElement()

createSVGTextPathElement

public final OMSVGTextPathElement createSVGTextPathElement()

createSVGAltGlyphElement

public final OMSVGAltGlyphElement createSVGAltGlyphElement()

createSVGAltGlyphDefElement

public final OMSVGAltGlyphDefElement createSVGAltGlyphDefElement()

createSVGAltGlyphItemElement

public final OMSVGAltGlyphItemElement createSVGAltGlyphItemElement()

createSVGGlyphRefElement

public final OMSVGGlyphRefElement createSVGGlyphRefElement()

createSVGMarkerElement

public final OMSVGMarkerElement createSVGMarkerElement()

createSVGColorProfileElement

public final OMSVGColorProfileElement createSVGColorProfileElement()

createSVGLinearGradientElement

public final OMSVGLinearGradientElement createSVGLinearGradientElement()

createSVGRadialGradientElement

public final OMSVGRadialGradientElement createSVGRadialGradientElement()

createSVGStopElement

public final OMSVGStopElement createSVGStopElement()

createSVGPatternElement

public final OMSVGPatternElement createSVGPatternElement()

createSVGClipPathElement

public final OMSVGClipPathElement createSVGClipPathElement()

createSVGMaskElement

public final OMSVGMaskElement createSVGMaskElement()

createSVGFilterElement

public final OMSVGFilterElement createSVGFilterElement()

createSVGFEBlendElement

public final OMSVGFEBlendElement createSVGFEBlendElement()

createSVGFEColorMatrixElement

public final OMSVGFEColorMatrixElement createSVGFEColorMatrixElement()

createSVGFEComponentTransferElement

public final OMSVGFEComponentTransferElement createSVGFEComponentTransferElement()

createSVGFEFuncRElement

public final OMSVGFEFuncRElement createSVGFEFuncRElement()

createSVGFEFuncGElement

public final OMSVGFEFuncGElement createSVGFEFuncGElement()

createSVGFEFuncBElement

public final OMSVGFEFuncBElement createSVGFEFuncBElement()

createSVGFEFuncAElement

public final OMSVGFEFuncAElement createSVGFEFuncAElement()

createSVGFECompositeElement

public final OMSVGFECompositeElement createSVGFECompositeElement()

createSVGFEConvolveMatrixElement

public final OMSVGFEConvolveMatrixElement createSVGFEConvolveMatrixElement()

createSVGFEDiffuseLightingElement

public final OMSVGFEDiffuseLightingElement createSVGFEDiffuseLightingElement()

createSVGFEDistantLightElement

public final OMSVGFEDistantLightElement createSVGFEDistantLightElement()

createSVGFEPointLightElement

public final OMSVGFEPointLightElement createSVGFEPointLightElement()

createSVGFESpotLightElement

public final OMSVGFESpotLightElement createSVGFESpotLightElement()

createSVGFEDisplacementMapElement

public final OMSVGFEDisplacementMapElement createSVGFEDisplacementMapElement()

createSVGFEFloodElement

public final OMSVGFEFloodElement createSVGFEFloodElement()

createSVGFEGaussianBlurElement

public final OMSVGFEGaussianBlurElement createSVGFEGaussianBlurElement()

createSVGFEImageElement

public final OMSVGFEImageElement createSVGFEImageElement()

createSVGFEMergeElement

public final OMSVGFEMergeElement createSVGFEMergeElement()

createSVGFEMergeNodeElement

public final OMSVGFEMergeNodeElement createSVGFEMergeNodeElement()

createSVGFEMorphologyElement

public final OMSVGFEMorphologyElement createSVGFEMorphologyElement()

createSVGFEOffsetElement

public final OMSVGFEOffsetElement createSVGFEOffsetElement()

createSVGFESpecularLightingElement

public final OMSVGFESpecularLightingElement createSVGFESpecularLightingElement()

createSVGFETileElement

public final OMSVGFETileElement createSVGFETileElement()

createSVGFETurbulenceElement

public final OMSVGFETurbulenceElement createSVGFETurbulenceElement()

createSVGCursorElement

public final OMSVGCursorElement createSVGCursorElement()

createSVGAElement

public final OMSVGAElement createSVGAElement()

createSVGViewElement

public final OMSVGViewElement createSVGViewElement()

createSVGScriptElement

public final OMSVGScriptElement createSVGScriptElement()

createSVGAnimateElement

public final OMSVGAnimateElement createSVGAnimateElement()

createSVGSetElement

public final OMSVGSetElement createSVGSetElement()

createSVGAnimateMotionElement

public final OMSVGAnimateMotionElement createSVGAnimateMotionElement()

createSVGMPathElement

public final OMSVGMPathElement createSVGMPathElement()

createSVGAnimateColorElement

public final OMSVGAnimateColorElement createSVGAnimateColorElement()

createSVGAnimateTransformElement

public final OMSVGAnimateTransformElement createSVGAnimateTransformElement()

createSVGFontElement

public final OMSVGFontElement createSVGFontElement()

createSVGGlyphElement

public final OMSVGGlyphElement createSVGGlyphElement()

createSVGMissingGlyphElement

public final OMSVGMissingGlyphElement createSVGMissingGlyphElement()

createSVGHKernElement

public final OMSVGHKernElement createSVGHKernElement()

createSVGVKernElement

public final OMSVGVKernElement createSVGVKernElement()

createSVGFontFaceElement

public final OMSVGFontFaceElement createSVGFontFaceElement()

createSVGFontFaceSrcElement

public final OMSVGFontFaceSrcElement createSVGFontFaceSrcElement()

createSVGFontFaceUriElement

public final OMSVGFontFaceUriElement createSVGFontFaceUriElement()

createSVGFontFaceFormatElement

public final OMSVGFontFaceFormatElement createSVGFontFaceFormatElement()

createSVGFontFaceNameElement

public final OMSVGFontFaceNameElement createSVGFontFaceNameElement()

createSVGMetadataElement

public final OMSVGMetadataElement createSVGMetadataElement()

createSVGForeignObjectElement

public final OMSVGForeignObjectElement createSVGForeignObjectElement()

createSVGCircleElement

public final OMSVGCircleElement createSVGCircleElement(float cx,
                                                       float cy,
                                                       float r)
Creates an OMSVGCircleElement object in this document but does not attach it to the document tree. The object is initialized to the specified coordinates and radius.

Parameters:
cx - the X coordinate of the circle center
cy - the Y coordinate of the circle center
r - the circle radius
Returns:
An OMSVGCircleElement object.

createSVGEllipseElement

public final OMSVGEllipseElement createSVGEllipseElement(float cx,
                                                         float cy,
                                                         float rx,
                                                         float ry)
Creates an OMSVGEllipseElement object in this document but does not attach it to the document tree. The object is initialized to the specified coordinates and radii.

Parameters:
cx - the X coordinate of the ellipse center
cy - the Y coordinate of the ellipse center
rx - the X-axis radius of the ellipse
ry - the Y-axis radius of the ellipse
Returns:
An OMSVGEllipseElement object.

createSVGLineElement

public final OMSVGLineElement createSVGLineElement(float x1,
                                                   float y1,
                                                   float x2,
                                                   float y2)
Creates an OMSVGLineElement object in this document but does not attach it to the document tree. The object is initialized to the specified endpoint coordinates.

Parameters:
x1 - the X coordinate of the first endpoint
y1 - the Y coordinate of the first endpoint
x2 - the X coordinate of the second endpoint
y2 - the Y coordinate of the second endpoint
Returns:
An OMSVGLineElement object.

createSVGLineElement

public final OMSVGLineElement createSVGLineElement(OMSVGPoint p1,
                                                   OMSVGPoint p2)
Creates an OMSVGLineElement object in this document but does not attach it to the document tree. The object is initialized to the specified endpoints.

Parameters:
p1 - the first endpoint
p2 - the the second endpoint
Returns:
An OMSVGLineElement object.

createSVGRectElement

public final OMSVGRectElement createSVGRectElement(float x,
                                                   float y,
                                                   float width,
                                                   float height,
                                                   float rx,
                                                   float ry)
Creates an 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.

Parameters:
x - the X coordinate of the upper left corner
y - the Y coordinate of the upper left corner
width - the width of the rectangle
height - the width of the rectangle
rx - the X-axis radius of the rectangle corner
ry - the Y-axis radius of the rectangle corner
Returns:
An OMSVGRectElement object.

createSVGRectElement

public final OMSVGRectElement createSVGRectElement(OMSVGRect rect)
Creates an 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.

Parameters:
rect - The SVG rect to use to initialize this rect.
Returns:
An OMSVGRectElement object.

createSVGTextElement

public final OMSVGTextElement createSVGTextElement(float x,
                                                   float y,
                                                   short unitType,
                                                   String data)
Creates an 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.

Parameters:
x - the X coordinate of the text in specified units
y - the Y coordinate of the text in specified units
unitType - the unit type used to specify the text coordinates
data - the string represented by the text object.
Returns:
An OMSVGTextElement object.

createSVGImageElement

public final OMSVGImageElement createSVGImageElement(float x,
                                                     float y,
                                                     float width,
                                                     float height,
                                                     String href)
Creates an 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.

Parameters:
x - the X coordinate of the image
y - the Y coordinate of the image
width - the width of the image
height - the width of the image
href - the bitmap image referenced by this image element
Returns:
An OMSVGImageElement object.

createSVGTitleElement

public final OMSVGTitleElement createSVGTitleElement(String text)
Creates an OMSVGTitleElement object in this document but does not attach it to the document tree. The object is initialized to the specified text.

Parameters:
text - the title text
Returns:
An OMSVGTitleElement object.

createSVGDescElement

public final OMSVGDescElement createSVGDescElement(String text)
Creates an OMSVGDescElement object in this document but does not attach it to the document tree. The object is initialized to the specified text.

Parameters:
text - the description text
Returns:
An OMSVGDescElement object.


Copyright © 2012. All Rights Reserved.