Package com.kitfox.svg
Class Text
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable
public class Text extends ShapeElement
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.LinkedList<java.io.Serializable>content(package private) java.lang.StringfontFamily(package private) floatfontSize(package private) intfontStyle(package private) intfontWeight(package private) java.lang.StringlengthAdjuststatic java.lang.StringTAG_NAME(package private) inttextAnchor(package private) floattextLength(package private) java.awt.ShapetextShape(package private) java.awt.geom.AffineTransformtransformstatic intTXAN_ENDstatic intTXAN_MIDDLEstatic intTXAN_STARTstatic intTXST_ITALICstatic intTXST_NORMALstatic intTXST_OBLIQUEstatic intTXWE_100static intTXWE_200static intTXWE_300static intTXWE_400static intTXWE_500static intTXWE_600static intTXWE_700static intTXWE_800static intTXWE_900static intTXWE_BOLDstatic intTXWE_BOLDERstatic intTXWE_LIGHTERstatic intTXWE_NORMAL(package private) floatx(package private) floaty-
Fields inherited from class com.kitfox.svg.ShapeElement
strokeWidthScalar
-
Fields inherited from class com.kitfox.svg.RenderableElement
cachedClip, cachedXform, VECTOR_EFFECT_NON_SCALING_STROKE, VECTOR_EFFECT_NONE, vectorEffect
-
Fields inherited from class com.kitfox.svg.TransformableElement
xform
-
Fields inherited from class com.kitfox.svg.SVGElement
children, contexts, cssClass, diagram, dirty, id, ignorePresAttrib, inlineStyles, parent, presAttribs, serialVersionUID, SVG_NS, trackManager, xmlBase
-
-
Constructor Summary
Constructors Constructor Description Text()Creates a new instance of Stop
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendText(java.lang.String text)voidappendTspan(Tspan tspan)voidbuild()Called by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.protected voidbuildText()java.awt.geom.Rectangle2DgetBoundingBox()java.util.List<java.io.Serializable>getContent()java.awt.ShapegetShape()java.lang.StringgetTagName()voidloaderAddChild(SVGLoaderHelper helper, SVGElement child)Called after the start element but before the end element to indicate each child tag that has been processedvoidloaderAddText(SVGLoaderHelper helper, java.lang.String text)Called during load process to add text scanned within a tagvoidrebuild()Discard cached informationvoidrender(java.awt.Graphics2D g)booleanupdateTime(double curTime)Updates all attributes in this diagram associated with a time event.-
Methods inherited from class com.kitfox.svg.ShapeElement
includeStrokeInBounds, pick, pick, renderShape
-
Methods inherited from class com.kitfox.svg.RenderableElement
beginLayer, finishLayer
-
Methods inherited from class com.kitfox.svg.TransformableElement
boundsToParent, getXForm, shapeToParent
-
Methods inherited from class com.kitfox.svg.SVGElement
addAttribute, buildPath, getChild, getChild, getChildren, getId, getInlineAttributes, getNumChildren, getParent, getParentContext, getPath, getPres, getPresAbsolute, getPresentationAttributes, getRoot, getStyle, getStyle, getStyle, getStyleAbsolute, getXMLBase, hasAttribute, indexOfChild, lerp, loaderEndElement, loaderStartElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, popParentContext, pushParentContext, removeAttribute, removeChild, setAttribute, setDiagram, setParent, swapChildren
-
-
-
-
Field Detail
-
TAG_NAME
public static final java.lang.String TAG_NAME
- See Also:
- Constant Field Values
-
x
float x
-
y
float y
-
transform
java.awt.geom.AffineTransform transform
-
fontFamily
java.lang.String fontFamily
-
fontSize
float fontSize
-
content
java.util.LinkedList<java.io.Serializable> content
-
textShape
java.awt.Shape textShape
-
TXAN_START
public static final int TXAN_START
- See Also:
- Constant Field Values
-
TXAN_MIDDLE
public static final int TXAN_MIDDLE
- See Also:
- Constant Field Values
-
TXAN_END
public static final int TXAN_END
- See Also:
- Constant Field Values
-
textAnchor
int textAnchor
-
TXST_NORMAL
public static final int TXST_NORMAL
- See Also:
- Constant Field Values
-
TXST_ITALIC
public static final int TXST_ITALIC
- See Also:
- Constant Field Values
-
TXST_OBLIQUE
public static final int TXST_OBLIQUE
- See Also:
- Constant Field Values
-
fontStyle
int fontStyle
-
TXWE_NORMAL
public static final int TXWE_NORMAL
- See Also:
- Constant Field Values
-
TXWE_BOLD
public static final int TXWE_BOLD
- See Also:
- Constant Field Values
-
TXWE_BOLDER
public static final int TXWE_BOLDER
- See Also:
- Constant Field Values
-
TXWE_LIGHTER
public static final int TXWE_LIGHTER
- See Also:
- Constant Field Values
-
TXWE_100
public static final int TXWE_100
- See Also:
- Constant Field Values
-
TXWE_200
public static final int TXWE_200
- See Also:
- Constant Field Values
-
TXWE_300
public static final int TXWE_300
- See Also:
- Constant Field Values
-
TXWE_400
public static final int TXWE_400
- See Also:
- Constant Field Values
-
TXWE_500
public static final int TXWE_500
- See Also:
- Constant Field Values
-
TXWE_600
public static final int TXWE_600
- See Also:
- Constant Field Values
-
TXWE_700
public static final int TXWE_700
- See Also:
- Constant Field Values
-
TXWE_800
public static final int TXWE_800
- See Also:
- Constant Field Values
-
TXWE_900
public static final int TXWE_900
- See Also:
- Constant Field Values
-
fontWeight
int fontWeight
-
textLength
float textLength
-
lengthAdjust
java.lang.String lengthAdjust
-
-
Method Detail
-
getTagName
public java.lang.String getTagName()
- Specified by:
getTagNamein classSVGElement
-
appendText
public void appendText(java.lang.String text)
-
appendTspan
public void appendTspan(Tspan tspan) throws SVGElementException
- Throws:
SVGElementException
-
rebuild
public void rebuild() throws SVGExceptionDiscard cached information- Throws:
SVGException
-
getContent
public java.util.List<java.io.Serializable> getContent()
-
loaderAddChild
public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
Called after the start element but before the end element to indicate each child tag that has been processed- Overrides:
loaderAddChildin classSVGElement- Throws:
SVGElementException
-
loaderAddText
public void loaderAddText(SVGLoaderHelper helper, java.lang.String text)
Called during load process to add text scanned within a tag- Overrides:
loaderAddTextin classSVGElement
-
build
public void build() throws SVGExceptionDescription copied from class:SVGElementCalled by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.- Overrides:
buildin classRenderableElement- Throws:
SVGException
-
buildText
protected void buildText() throws SVGException- Throws:
SVGException
-
render
public void render(java.awt.Graphics2D g) throws SVGException- Specified by:
renderin classShapeElement- Throws:
SVGException
-
getShape
public java.awt.Shape getShape()
- Specified by:
getShapein classShapeElement
-
getBoundingBox
public java.awt.geom.Rectangle2D getBoundingBox() throws SVGException- Specified by:
getBoundingBoxin classRenderableElement- Throws:
SVGException
-
updateTime
public boolean updateTime(double curTime) throws SVGExceptionUpdates all attributes in this diagram associated with a time event. Ie, all attributes with track information.- Overrides:
updateTimein classTransformableElement- Returns:
- - true if this node has changed state as a result of the time update
- Throws:
SVGException
-
-