org.vectomatic.dom.svg
Class OMSVGTextElement

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.OMSVGTextContentElement
                  extended by org.vectomatic.dom.svg.OMSVGTextPositioningElement
                      extended by org.vectomatic.dom.svg.OMSVGTextElement
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllDragAndDropHandlers, com.google.gwt.event.dom.client.HasAllTouchHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.dom.client.HasDragEndHandlers, com.google.gwt.event.dom.client.HasDragEnterHandlers, com.google.gwt.event.dom.client.HasDragHandlers, com.google.gwt.event.dom.client.HasDragLeaveHandlers, com.google.gwt.event.dom.client.HasDragOverHandlers, com.google.gwt.event.dom.client.HasDragStartHandlers, com.google.gwt.event.dom.client.HasDropHandlers, 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.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.shared.HasHandlers, HasActivateHandlers, HasFocusInHandlers, HasFocusOutHandlers, HasGraphicalHandlers, ISVGExternalResourcesRequired, ISVGGraphicsElement, ISVGLangSpace, ISVGLocatable, ISVGStylable, ISVGTests, ISVGTransformable

@TagName(value="text")
public class OMSVGTextElement
extends OMSVGTextPositioningElement
implements ISVGTransformable, ISVGGraphicsElement

The OMSVGTextElement interface corresponds to the text element.


Field Summary
 
Fields inherited from class org.vectomatic.dom.svg.OMSVGTextContentElement
LENGTHADJUST_SPACING, LENGTHADJUST_SPACINGANDGLYPHS, LENGTHADJUST_UNKNOWN
 
Fields inherited from class org.vectomatic.dom.svg.OMNode
eventBus, ot
 
Constructor Summary
  OMSVGTextElement()
           
  OMSVGTextElement(float x, float y, short unitType, String data)
          Constructor.
protected OMSVGTextElement(SVGTextElement ot)
           
 
Method Summary
 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).
 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().
 OMSVGElement getFarthestViewportElement()
          The farthest ancestor svg element.
 OMSVGElement getNearestViewportElement()
          The element which established the current viewport.
 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".
 OMSVGAnimatedTransformList getTransform()
          Corresponds to attribute ISVGTransformable.getTransform() 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).
 
Methods inherited from class org.vectomatic.dom.svg.OMSVGTextPositioningElement
getDx, getDy, getRotate, getX, getY
 
Methods inherited from class org.vectomatic.dom.svg.OMSVGTextContentElement
addActivateHandler, addClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusInHandler, addFocusOutHandler, addLoadHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getCharNumAtPosition, getComputedTextLength, getEndPositionOfChar, getExtentOfChar, getExternalResourcesRequired, getLengthAdjust, getNumberOfChars, getRequiredExtensions, getRequiredFeatures, getRotationOfChar, getStartPositionOfChar, getSubStringLength, getSystemLanguage, getTextLength, getXmllang, getXmlspace, hasExtension, selectSubString, setXmllang, setXmlspace
 
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

OMSVGTextElement

public OMSVGTextElement()

OMSVGTextElement

protected OMSVGTextElement(SVGTextElement ot)

OMSVGTextElement

public OMSVGTextElement(float x,
                        float y,
                        short unitType,
                        String data)
Constructor.

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.
Method Detail

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

getTransform

public final OMSVGAnimatedTransformList getTransform()
Corresponds to attribute ISVGTransformable.getTransform() on the given element.

Specified by:
getTransform in interface ISVGTransformable


Copyright © 2012. All Rights Reserved.