public abstract class OMSVGTextContentElement extends OMSVGElement implements HasGraphicalHandlers, ISVGTests, ISVGLangSpace, ISVGExternalResourcesRequired, ISVGStylable
The OMSVGTextContentElement is inherited
by various text-related interfaces, such as OMSVGTextElement,
OMSVGTSpanElement, OMSVGTRefElement,
OMSVGAltGlyphElement and OMSVGTextPathElement.
For the methods on this interface that refer to an index to a character
or a number of characters, these references are to be interpreted as an
index to a UTF-16 code unit or a number of UTF-16 code units, respectively.
This is for consistency with DOM Level 2 Core, where methods on the CharacterData
interface use UTF-16 code units as indexes and counts within the character
data. Thus for example, if the text content of a text element is a single non-BMP
character, such as U+10000, then invoking getNumberOfChars()
on that element will return 2 since there are two UTF-16 code units (the
surrogate pair) used to represent that one character.
| Modifier and Type | Field and Description |
|---|---|
static short |
LENGTHADJUST_SPACING
Corresponds to value 'spacing'.
|
static short |
LENGTHADJUST_SPACINGANDGLYPHS
Corresponds to value 'spacingAndGlyphs'.
|
static short |
LENGTHADJUST_UNKNOWN
The enumeration was set to a value that is not one of predefined types.
|
| Modifier | Constructor and Description |
|---|---|
protected |
OMSVGTextContentElement(SVGTextContentElement ot) |
| Modifier and Type | Method and Description |
|---|---|
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 |
addDragEndHandler(com.google.gwt.event.dom.client.DragEndHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addDragEnterHandler(com.google.gwt.event.dom.client.DragEnterHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addDragHandler(com.google.gwt.event.dom.client.DragHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addDragLeaveHandler(com.google.gwt.event.dom.client.DragLeaveHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addDragOverHandler(com.google.gwt.event.dom.client.DragOverHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addDragStartHandler(com.google.gwt.event.dom.client.DragStartHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addDropHandler(com.google.gwt.event.dom.client.DropHandler 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 |
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) |
int |
getCharNumAtPosition(OMSVGPoint point)
Returns the index of the character whose corresponding glyph cell bounding
box contains the specified point.
|
float |
getComputedTextLength()
The total sum of all of the advance values from rendering all of the characters
within this element, including the advance value on the glyphs (horizontal
or vertical), the effect of properties
kerning, letter-spacing
and word-spacing and adjustments due to attributes tspan/dx
and tspan/dy on tspan elements. |
OMSVGPoint |
getEndPositionOfChar(int charnum)
Returns the current text position after rendering the character in the
user coordinate system for rendering the glyph(s) that correspond to the
specified character.
|
OMSVGRect |
getExtentOfChar(int charnum)
Returns a tightest rectangle which defines the minimum and maximum X and
Y values in the user coordinate system for rendering the glyph(s) that
correspond to the specified character.
|
OMSVGAnimatedBoolean |
getExternalResourcesRequired()
Corresponds to attribute
ISVGExternalResourcesRequired.getExternalResourcesRequired()
on the given element. |
OMSVGAnimatedEnumeration |
getLengthAdjust()
Corresponds to attribute 'lengthAdjust'
on the given element.
|
int |
getNumberOfChars()
Returns the total number of characters available for rendering within the
current element, which includes referenced characters from tref reference, regardless of whether
they will be rendered.
|
OMSVGStringList |
getRequiredExtensions()
Corresponds to attribute
ISVGTests.getRequiredExtensions()
on the given element. |
OMSVGStringList |
getRequiredFeatures()
Corresponds to attribute
ISVGTests.getRequiredFeatures()
on the given element. |
float |
getRotationOfChar(int charnum)
Returns the rotation value relative to the current user coordinate system
used to render the glyph(s) corresponding to the specified character.
|
OMSVGPoint |
getStartPositionOfChar(int charnum)
Returns the current text position before rendering the character in the
user coordinate system for rendering the glyph(s) that correspond to the
specified character.
|
float |
getSubStringLength(int charnum,
int nchars)
The total sum of all of the advance values from rendering the specified
substring of the characters, including the advance value on the glyphs
(horizontal or vertical), the effect of properties
kerning,
letter-spacing and word-spacing and adjustments
due to attributes tspan/dx and tspan/dy on tspan elements. |
OMSVGStringList |
getSystemLanguage()
Corresponds to attribute
ISVGTests.getSystemLanguage()
on the given element. |
OMSVGAnimatedLength |
getTextLength()
Corresponds to attribute 'textLength' on
the given element.
|
String |
getXmllang()
Corresponds to attribute
xml:lang on the given element. |
String |
getXmlspace()
Corresponds to attribute
xml:space on the given element. |
boolean |
hasExtension(String extension)
Returns true if the user agent supports the given extension, specified
by a URI.
|
void |
selectSubString(int charnum,
int nchars)
Causes the specified substring to be selected just as if the user selected
the substring interactively.
|
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. |
addClassNameBaseVal, getClassName, getMarkup, getOwnerSVGElement, getStyle, getViewportElement, getXmlbase, removeClassNameBaseVal, replaceClassNameBaseVal, setClassNameBaseVal, setId, setXmlbasegetAttribute, getAttributeNode, getAttributeNS, getAttributes, getElement, getElementsByTagName, getElementsByTagNameNS, getId, getTagName, hasAttribute, hasAttributeNS, removeAttribute, setAttribute, setAttributeNode, setAttributeNSaddDomHandler, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddClassNameBaseVal, getClassName, getStyle, removeClassNameBaseVal, replaceClassNameBaseVal, setClassNameBaseValpublic static final short LENGTHADJUST_UNKNOWN
public static final short LENGTHADJUST_SPACING
public static final short LENGTHADJUST_SPACINGANDGLYPHS
protected OMSVGTextContentElement(SVGTextContentElement ot)
public final OMSVGAnimatedLength getTextLength()
public final OMSVGAnimatedEnumeration getLengthAdjust()
public final int getNumberOfChars()
public final float getComputedTextLength()
kerning, letter-spacing
and word-spacing and adjustments due to attributes tspan/dx
and tspan/dy on tspan elements. For non-rendering
environments, the user agent shall make reasonable assumptions about glyph
metrics.public final float getSubStringLength(int charnum,
int nchars)
throws com.google.gwt.core.client.JavaScriptException
kerning,
letter-spacing and word-spacing and adjustments
due to attributes tspan/dx and tspan/dy on tspan elements. For non-rendering environments, the
user agent shall make reasonable assumptions about glyph metrics. If multiple
consecutive characters are rendered inseparably (e.g., as a single glyph
or a sequence of glyphs, or because the range encompasses half of a surrogate
pair), and nchars is greater than 0 then the measured range shall be expanded
so that each of the inseparable characters are included.charnum - The index of the first character in the substring, where
the first character has an index of 0.nchars - The number of characters in the substring. If nchars specifies
more characters than are available, then the substring will consist of
all characters starting with charnum until the end of the list of characters.DOMException(INDEX_SIZE_ERR) - Raised if charnum or
nchars is negative or if charnum is greater than
or equal to the number of characters at this node.com.google.gwt.core.client.JavaScriptExceptionpublic final OMSVGPoint getStartPositionOfChar(int charnum) throws com.google.gwt.core.client.JavaScriptException
kerning,
letter-spacing and word-spacing and adjustments
due to attributes 'x', 'y',
'dx' and 'dy'.
If multiple consecutive characters are rendered inseparably (e.g., as a
single glyph or a sequence of glyphs), then each of the inseparable characters
will return the start position for the first glyph.charnum - The index of the character, where the first character has
an index of 0.DOMException(INDEX_SIZE_ERR) - Raised if the charnum is
negative or if charnum is greater than or equal to the number
of characters at this node.com.google.gwt.core.client.JavaScriptExceptionpublic final OMSVGPoint getEndPositionOfChar(int charnum) throws com.google.gwt.core.client.JavaScriptException
kerning, letter-spacing
and word-spacing and adjustments due to attributes 'x',
'y', 'dx'
and 'dy'. If multiple consecutive characters
are rendered inseparably (e.g., as a single glyph or a sequence of glyphs),
then each of the inseparable characters will return the end position for
the last glyph.charnum - The index of the character, where the first character has
an index of 0.DOMException(INDEX_SIZE_ERR) - Raised if the charnum is
negative or if charnum is greater than or equal to the number
of characters at this node.com.google.gwt.core.client.JavaScriptExceptionpublic final OMSVGRect getExtentOfChar(int charnum) throws com.google.gwt.core.client.JavaScriptException
charnum - The index of the character, where the first character has
an index of 0.DOMException(INDEX_SIZE_ERR) - Raised if the charnum is
negative or if charnum is greater than or equal to the number
of characters at this node.com.google.gwt.core.client.JavaScriptExceptionpublic final float getRotationOfChar(int charnum)
throws com.google.gwt.core.client.JavaScriptException
glyph-orientation-horizontal and glyph-orientation-vertical;
thus, any glyph rotations due to these properties are not included into
the returned rotation value. If multiple consecutive characters are rendered
inseparably (e.g., as a single glyph or a sequence of glyphs), then each
of the inseparable characters will return the same rotation value.charnum - The index of the character, where the first character has
an index of 0.DOMException(INDEX_SIZE_ERR) - Raised if the charnum is
negative or if charnum is greater than or equal to the number
of characters at this node.com.google.gwt.core.client.JavaScriptExceptionpublic final int getCharNumAtPosition(OMSVGPoint point)
point - A point in user space.public final void selectSubString(int charnum,
int nchars)
throws com.google.gwt.core.client.JavaScriptException
charnum - The index of the start character which is at the given
point, where the first character has an index of 0.nchars - The number of characters in the substring. If nchars specifies
more characters than are available, then the substring will consist of
all characters starting with charnum until the end of the list of characters.DOMException(INDEX_SIZE_ERR) - Raised if charnum or
nchars is negative or if charnum is greater than
or equal to the number of characters at this node.com.google.gwt.core.client.JavaScriptExceptionpublic final OMSVGAnimatedBoolean getExternalResourcesRequired()
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().getExternalResourcesRequired in interface ISVGExternalResourcesRequiredpublic final String getXmllang()
xml:lang on the given element.getXmllang in interface ISVGLangSpacepublic final void setXmllang(String value) throws com.google.gwt.core.client.JavaScriptException
xml:lang on the given element.setXmllang in interface ISVGLangSpaceDOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised on an attempt
to change the value of a read only
attribute.com.google.gwt.core.client.JavaScriptExceptionpublic final String getXmlspace()
xml:space on the given element.getXmlspace in interface ISVGLangSpacepublic final void setXmlspace(String value) throws com.google.gwt.core.client.JavaScriptException
xml:space on the given element.setXmlspace in interface ISVGLangSpaceDOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised on an attempt
to change the value of a read only
attribute.com.google.gwt.core.client.JavaScriptExceptionpublic final OMSVGStringList getRequiredFeatures()
ISVGTests.getRequiredFeatures()
on the given element.getRequiredFeatures in interface ISVGTestspublic final OMSVGStringList getRequiredExtensions()
ISVGTests.getRequiredExtensions()
on the given element.getRequiredExtensions in interface ISVGTestspublic final OMSVGStringList getSystemLanguage()
ISVGTests.getSystemLanguage()
on the given element.getSystemLanguage in interface ISVGTestspublic final boolean hasExtension(String extension)
hasExtension in interface ISVGTestsextension - The name of the extension, expressed as a URI.public final com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
addClickHandler in interface com.google.gwt.event.dom.client.HasClickHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addDragEndHandler(com.google.gwt.event.dom.client.DragEndHandler handler)
addDragEndHandler in interface com.google.gwt.event.dom.client.HasDragEndHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addDragEnterHandler(com.google.gwt.event.dom.client.DragEnterHandler handler)
addDragEnterHandler in interface com.google.gwt.event.dom.client.HasDragEnterHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addDragHandler(com.google.gwt.event.dom.client.DragHandler handler)
addDragHandler in interface com.google.gwt.event.dom.client.HasDragHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addDragLeaveHandler(com.google.gwt.event.dom.client.DragLeaveHandler handler)
addDragLeaveHandler in interface com.google.gwt.event.dom.client.HasDragLeaveHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addDragOverHandler(com.google.gwt.event.dom.client.DragOverHandler handler)
addDragOverHandler in interface com.google.gwt.event.dom.client.HasDragOverHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addDragStartHandler(com.google.gwt.event.dom.client.DragStartHandler handler)
addDragStartHandler in interface com.google.gwt.event.dom.client.HasDragStartHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addDropHandler(com.google.gwt.event.dom.client.DropHandler handler)
addDropHandler in interface com.google.gwt.event.dom.client.HasDropHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addLoadHandler(com.google.gwt.event.dom.client.LoadHandler handler)
addLoadHandler in interface com.google.gwt.event.dom.client.HasLoadHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler handler)
addMouseDownHandler in interface com.google.gwt.event.dom.client.HasMouseDownHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler handler)
addMouseMoveHandler in interface com.google.gwt.event.dom.client.HasMouseMoveHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler)
addMouseOutHandler in interface com.google.gwt.event.dom.client.HasMouseOutHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler)
addMouseOverHandler in interface com.google.gwt.event.dom.client.HasMouseOverHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler handler)
addMouseUpHandler in interface com.google.gwt.event.dom.client.HasMouseUpHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addTouchCancelHandler(com.google.gwt.event.dom.client.TouchCancelHandler handler)
addTouchCancelHandler in interface com.google.gwt.event.dom.client.HasTouchCancelHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addTouchEndHandler(com.google.gwt.event.dom.client.TouchEndHandler handler)
addTouchEndHandler in interface com.google.gwt.event.dom.client.HasTouchEndHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addTouchMoveHandler(com.google.gwt.event.dom.client.TouchMoveHandler handler)
addTouchMoveHandler in interface com.google.gwt.event.dom.client.HasTouchMoveHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addTouchStartHandler(com.google.gwt.event.dom.client.TouchStartHandler handler)
addTouchStartHandler in interface com.google.gwt.event.dom.client.HasTouchStartHandlerspublic final com.google.gwt.event.shared.HandlerRegistration addActivateHandler(ActivateHandler handler)
HasActivateHandlersActivateHandler handler.addActivateHandler in interface HasActivateHandlershandler - the activate handlerHandlerRegistration used to remove this handlerpublic final com.google.gwt.event.shared.HandlerRegistration addFocusInHandler(FocusInHandler handler)
HasFocusInHandlersFocusInHandler handler.addFocusInHandler in interface HasFocusInHandlershandler - the focusin handlerHandlerRegistration used to remove this handlerpublic final com.google.gwt.event.shared.HandlerRegistration addFocusOutHandler(FocusOutHandler handler)
HasFocusOutHandlersFocusOutHandler handler.addFocusOutHandler in interface HasFocusOutHandlershandler - the focusout handlerHandlerRegistration used to remove this handlerCopyright © 2018. All Rights Reserved.