- All Superinterfaces:
AllowsConditionalProcessingAttributes,AllowsGraphicalEventAttributes,AllowsPresentationAttributes,AllowsStyleAttributes,Element,SVGElement,SVGElementWithChildren
- All Known Implementing Classes:
SVGElementAdapter,SVGGenericElement,SVGTextImpl
@ClassVersion(sourceVersion="$Id: SVGText.java 1074 2023-10-02 12:05:06Z tquadrat $")
@API(status=STABLE,
since="0.0.5")
public sealed interface SVGText
extends SVGElementWithChildren, AllowsConditionalProcessingAttributes, AllowsGraphicalEventAttributes, AllowsPresentationAttributes, AllowsStyleAttributes
permits SVGElementAdapter, SVGTextImpl
The definition of the SVG
<text> element.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: SVGText.java 1074 2023-10-02 12:05:06Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.svg.SVGText"
-
Field Summary
Fields inherited from interface org.tquadrat.foundation.svg.AllowsConditionalProcessingAttributes
CONDITIONALPROCESSING_ATTRIBUTESFields inherited from interface org.tquadrat.foundation.svg.AllowsGraphicalEventAttributes
GRAPHICALEVENT_ATTRIBUTESFields inherited from interface org.tquadrat.foundation.svg.AllowsPresentationAttributes
PRESENTATION_ATTRIBUTESFields inherited from interface org.tquadrat.foundation.svg.AllowsStyleAttributes
STYLE_ATTRIBUTESFields inherited from interface org.tquadrat.foundation.svg.SVGElement
CORE_ATTRIBUTES -
Method Summary
Modifier and TypeMethodDescriptionaddCDATA(CharSequence text) Adds aCDATAelement to this<text>element.addText(CharSequence text) Adds text to this<text>element.voidSets a list of lengths which move the characters relative to the absolute position of the last glyph drawn.voidSets a list of heights which move the characters relative to the absolute position of the last glyph drawn.voidsetLengthAdjust(boolean flag) Sets the way the text length will be adjusted in order to meet the target length set bysetTextLength(SVGNumber).voidsetRotate(SVGNumber.SVGDegree... values) Sets a list of rotations for the glyphs.voidsetTextLength(SVGNumber value) Sets the target length for the text that an SVG viewer will attempt to display the text between by adjusting the spacing and/or the glyphs.voidSets a list of x-axis position.voidSets a list of y-axis position.Methods inherited from interface org.tquadrat.foundation.svg.AllowsConditionalProcessingAttributes
setExternalResourcesRequired, setRequiredExtensions, setRequiredFeatures, setSystemLanguageMethods inherited from interface org.tquadrat.foundation.svg.AllowsGraphicalEventAttributes
setActivationHandler, setFocusInHandler, setFocusOutHandlerMethods inherited from interface org.tquadrat.foundation.svg.AllowsPresentationAttributes
setAlignmentBaseline, setBaselineShift, setClip, setClipPath, setClipRule, setColor, setColorInterpolation, setColorInterpolationFilters, setColorProfile, setColorRendering, setCursor, setDirection, setDisplay, setDominantBaseline, setEnableBackground, setFill, setFillOpacity, setFillRule, setFilter, setFloodColor, setFloodOpacity, setFontFamily, setFontSize, setFontSizeAdjust, setFontStretch, setFontStyle, setFontVariant, setFontWeight, setGlyphOrientationHorizontal, setGlyphOrientationVertical, setImageRendering, setKerning, setLetterSpacing, setLightingColor, setMarkerEnd, setMarkerMid, setMarkerStart, setMask, setOpacity, setOverflow, setPointerEvents, setShapeRendering, setStopColor, setStopOpacity, setStroke, setStrokeDashArray, setStrokeDashOffset, setStrokeLineCap, setStrokeLineJoin, setStrokeMiterLimit, setStrokeOpacity, setStrokeWidth, setTextAnchor, setTextDecoration, setTextRendering, setTransform, setUnicodeBidi, setVectorEffect, setVisibility, setWordSpacing, setWritingModeMethods inherited from interface org.tquadrat.foundation.svg.AllowsStyleAttributes
setClass, setStyleMethods inherited from interface org.tquadrat.foundation.xml.builder.spi.Element
getAttribute, getAttributes, getChildren, getElementName, getNamespaces, getParent, hasChildren, isBlock, setParent, toStringMethods inherited from interface org.tquadrat.foundation.svg.SVGElement
addComment, getSVGElementCategory, setId, setLang, setPreserveSpace, setTabIndex, setTitle, setXMLBase, setXMLId, setXMLLangMethods inherited from interface org.tquadrat.foundation.svg.SVGElementWithChildren
addChild, setDescription
-
Method Details
-
addCDATA
Adds aCDATAelement to this<text>element.- Parameters:
text- The text.- Returns:
- This instance.
-
addText
Adds text to this<text>element. Special characters will be escaped.- Parameters:
text- The text.- Returns:
- This instance.
- Throws:
IllegalArgumentException- No text allowed for this element.
-
setDx
Sets a list of lengths which move the characters relative to the absolute position of the last glyph drawn. The nth length is given to nth character in the text. If there are additional characters after the positions run out, the last length is applied to them.- Parameters:
values- The lengths.
-
setDy
Sets a list of heights which move the characters relative to the absolute position of the last glyph drawn. The nth height is given to nth character in the text. If there are additional characters after the positions run out, the last height is applied to them.- Parameters:
values- The heights.
-
setLengthAdjust
Sets the way the text length will be adjusted in order to meet the target length set bysetTextLength(SVGNumber).- Parameters:
flag-truemeans that both, spacing and glyph size will be adjusted to match,falseindicates that only the spacing will be changed.
-
setRotate
Sets a list of rotations for the glyphs. The nth rotation is given to nth character in the text. Additional characters are not given the last rotation (although some browsers may handle that differently).- Parameters:
values- The rotations.
-
setTextLength
Sets the target length for the text that an SVG viewer will attempt to display the text between by adjusting the spacing and/or the glyphs.- Parameters:
value- The intended text length.
-
setX
Sets a list of x-axis position. The nth x-axis position is given to nth character in the text. If there are additional characters after the positions run out, they are placed after the last character.- Parameters:
values- The x-axis positions.
-
setY
Sets a list of y-axis position. The nth y-axis position is given to nth character in the text. If there are additional characters after the positions run out, they are placed after the last character.- Parameters:
values- The y-axis positions.
-
