java.lang.Object
org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
org.jhotdraw8.draw.figure.AbstractFigure
org.jhotdraw8.draw.figure.AbstractLeafFigure
org.jhotdraw8.svg.figure.SvgTextFigure
- All Implemented Interfaces:
DefaultableFigure,Figure,HideableFigure,LockableFigure,PathIterableFigure,StyleableFigure,TextableFigure,TransformCachingFigure,org.jhotdraw8.fxbase.beans.PropertyBean,org.jhotdraw8.fxbase.styleable.StyleableBean,org.jhotdraw8.fxbase.styleable.StyleablePropertyBean,org.jhotdraw8.fxbase.tree.TreeNode<Figure>,SvgDefaultableFigure,SvgElementFigure,SvgTransformableFigure
public class SvgTextFigure
extends AbstractLeafFigure
implements StyleableFigure, LockableFigure, SvgTransformableFigure, PathIterableFigure, HideableFigure, TextableFigure, SvgDefaultableFigure, SvgElementFigure
Represents an SVG 'text' element.
- Author:
- Werner Randelshofer
-
Property Summary
Properties inherited from class org.jhotdraw8.draw.figure.AbstractFigure
parentProperties inherited from interface org.jhotdraw8.draw.figure.StyleableFigure
id -
Nested Class Summary
Nested classes/interfaces inherited from interface org.jhotdraw8.fxbase.tree.TreeNode
org.jhotdraw8.fxbase.tree.TreeNode.AncestorIterator<T extends org.jhotdraw8.fxbase.tree.TreeNode<T>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CSS type selector for this object is "text".static final CssSizeStyleableKeystatic final CssSizeStyleableKeyFields inherited from class org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
keyMaps, propertiesFields inherited from interface org.jhotdraw8.draw.figure.Figure
declaredAndInheritedKeys, JHOTDRAW_CSS_PREFIX, PARENT_PROPERTYFields inherited from interface org.jhotdraw8.draw.figure.HideableFigure
VISIBLEFields inherited from interface org.jhotdraw8.draw.figure.LockableFigure
LOCKEDFields inherited from interface org.jhotdraw8.draw.figure.StyleableFigure
ID, PSEUDO_CLASS, STYLE, STYLE_CLASS, TYPE_SELECTOR_NODE_KEYFields inherited from interface org.jhotdraw8.svg.figure.SvgDefaultableFigure
COLOR_KEY, DISPLAY_KEY, FILL_KEY, FILL_OPACITY_KEY, FILL_RULE_KEY, FONT_FAMILY_KEY, FONT_SIZE_KEY, MIX_BLEND_MODE_KEY, OPACITY_KEY, SHAPE_RENDERING_KEY, STOP_COLOR_KEY, STOP_OPACITY_KEY, STROKE_ALIGNMENT_KEY, STROKE_DASHARRAY_KEY, STROKE_DASHOFFSET_KEY, STROKE_KEY, STROKE_LINECAP_KEY, STROKE_LINEJOIN_KEY, STROKE_MITERLIMIT_KEY, STROKE_OPACITY_KEY, STROKE_WIDTH_KEY, TEXT_ANCHOR_KEY, VISIBILITY_KEYFields inherited from interface org.jhotdraw8.svg.figure.SvgElementFigure
DESC_KEY, TITLE_KEYFields inherited from interface org.jhotdraw8.svg.figure.SvgTransformableFigure
CACHE, TRANSFORMSFields inherited from interface org.jhotdraw8.draw.figure.TextableFigure
TEXTFields inherited from interface org.jhotdraw8.draw.figure.TransformCachingFigure
CACHE -
Constructor Summary
ConstructorsConstructorDescriptionSvgTextFigure(double x, double y) SvgTextFigure(javafx.geometry.Point2D position) -
Method Summary
Modifier and TypeMethodDescriptionjavafx.geometry.BoundsComputes the bounds of the node for layout calculations.protected javafx.geometry.BoundscomputeLayoutBounds(RenderContext ctx, javafx.scene.text.Text textNode) javafx.scene.NodecreateNode(RenderContext drawingView) javafx.geometry.Boundsprotected @Nullable javafx.geometry.Boundsjavafx.geometry.BoundsgetPathIterator(RenderContext ctx, @Nullable AffineTransform tx) protected @Nullable StringgetText(RenderContext ctx) protected javafx.geometry.BoundsgetTextBounds(@Nullable RenderContext ctx) Returns the bounds of the text node for layout calculations.voidlayout(RenderContext ctx) voidreshapeInLocal(org.jhotdraw8.css.value.CssSize x, org.jhotdraw8.css.value.CssSize y, org.jhotdraw8.css.value.CssSize width, org.jhotdraw8.css.value.CssSize height) protected @Nullable javafx.geometry.BoundssetCachedLayoutBounds(javafx.geometry.Bounds newValue) voidtranslateInLocal(CssPoint2D delta) protected voidupdateGroupNode(RenderContext ctx, javafx.scene.Group node) voidupdateNode(RenderContext ctx, javafx.scene.Node node) protected voidupdateTextNode(RenderContext ctx, javafx.scene.text.Text tn) Methods inherited from class org.jhotdraw8.draw.figure.AbstractLeafFigure
getChildren, isAllowsChildren, isSuitableChild, isSuitableParentMethods inherited from class org.jhotdraw8.draw.figure.AbstractFigure
addedToDrawing, createKeyMap, doAddedToDrawing, doRemovedFromDrawing, getCachedLocalToParent, getCachedLocalToWorld, getCachedParentToLocal, getCachedParentToWorld, getCachedWorldToLocal, getCachedWorldToParent, getDrawing, getLayoutObservers, getPropertyChangeListeners, getReadOnlyLayoutObservers, getStyledNonNull, hasPropertyChangeListeners, onPropertyChanged, parentProperty, removeAllLayoutSubjects, removedFromDrawing, removeLayoutSubject, setCachedLocalToParent, setCachedLocalToWorld, setCachedParentToLocal, setCachedParentToWorld, setCachedWorldToLocal, setCachedWorldToParent, updateCssMethods inherited from class org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
callObservers, containsMapAccessor, getProperties, getStyleableMap, getStyled, getStyled, remove, removeAll, resetStyledValues, setStyledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.draw.figure.DefaultableFigure
getDefaultableStyled, getDefaultableStyled, getDefaultableStyledNonNullMethods inherited from interface org.jhotdraw8.draw.figure.Figure
addChild, addedToDrawing, createHandles, disconnect, firePropertyChangeEvent, firePropertyChangeEvent, getBoundsInParent, getBoundsInWorld, getCenterInLocal, getCenterInParent, getChildren, getDrawing, getLayer, getLayoutBoundsInParent, getLayoutBoundsInWorld, getLayoutObservers, getLayoutSubjects, getParent, getPreferredAspectRatio, getPropertyChangeListeners, getReadOnlyLayoutObservers, getRoot, getStyleableParent, getSupportedKeys, getVisualBounds, getVisualBoundsInWorld, hasPropertyChangeListeners, isAllowsChildren, isDecomposable, isDeletWithLastLayoutSubject, isEditableKey, isGroupReshapeableWith, isLayoutable, isShowing, isSuitableChild, isSuitableParent, isSupportedKey, isVisible, layoutChanged, layoutObserverChanged, layoutSubjectChanged, localToParent, localToWorld, localToWorld, parentProperty, propertyChanged, removeAllLayoutSubjects, removeChild, removedFromDrawing, removeFromParent, removeLayoutSubject, reshapeInLocal, reshapeInLocal, setParent, stylesheetChanged, transformChanged, translateInParent, updateCss, worldToLocal, worldToLocal, worldToParent, worldToParentMethods inherited from interface org.jhotdraw8.draw.figure.HideableFigure
applyHideableFigurePropertiesMethods inherited from interface org.jhotdraw8.draw.figure.LockableFigure
isDeletable, isEditable, isSelectableMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
get, getNonNull, getProperties, getProperty, put, remove, set, setNonNull, valueAtMethods inherited from interface org.jhotdraw8.draw.figure.StyleableFigure
applyStyleableFigureProperties, getId, getPseudoClassStates, getStyle, getStyleClasses, idPropertyMethods inherited from interface org.jhotdraw8.fxbase.styleable.StyleablePropertyBean
containsMapAccessor, getStyled, getStyled, getStyledNonNull, remove, removeAll, resetStyledValues, setStyledMethods inherited from interface org.jhotdraw8.svg.figure.SvgDefaultableFigure
applySvgDefaultableCompositingProperties, applySvgDefaultableFillProperties, applySvgDefaultableStrokeProperties, applySvgShapeProperties, getDefaultableStyled, getDefaultableStyledMethods inherited from interface org.jhotdraw8.svg.figure.SvgTransformableFigure
applyTransformableFigureProperties, clearTransforms, flattenTransforms, getInverseTransform, getLocalToParent, getLocalToParent, getLocalToParentAsList, getParentToLocal, getParentToLocal, getTransform, hasCenterTransforms, hasTransforms, reshapeInLocal, reshapeInParent, setTransforms, transformInLocal, transformInParentMethods inherited from interface org.jhotdraw8.draw.figure.TextableFigure
applyTextableFigureProperties, applyTextableFigurePropertiesMethods inherited from interface org.jhotdraw8.draw.figure.TransformCachingFigure
getCachedLocalToParent, getCachedLocalToWorld, getCachedParentToLocal, getCachedParentToWorld, getCachedWorldToLocal, getCachedWorldToParent, getLocalToWorld, getParentToWorld, getWorldToLocal, getWorldToParent, invalidateTransforms, setCachedLocalToParent, setCachedLocalToWorld, setCachedParentToLocal, setCachedParentToWorld, setCachedWorldToLocal, setCachedWorldToParentMethods inherited from interface org.jhotdraw8.fxbase.tree.TreeNode
ancestorIterable, breadthFirstIterable, depthFirstIterable, dumpTree, dumpTree, getAncestor, getChild, getDepth, getFirstChild, getLastChild, getMaxDepth, getPath, postorderIterable, preorderIterable, preorderSpliterator
-
Field Details
-
TYPE_SELECTOR
The CSS type selector for this object is "text".- See Also:
-
X
-
Y
-
-
Constructor Details
-
SvgTextFigure
public SvgTextFigure() -
SvgTextFigure
public SvgTextFigure(javafx.geometry.Point2D position) -
SvgTextFigure
public SvgTextFigure(double x, double y)
-
-
Method Details
-
createNode
- Specified by:
createNodein interfaceFigure
-
getCachedLayoutBounds
protected @Nullable javafx.geometry.Bounds getCachedLayoutBounds() -
getTypeSelector
- Specified by:
getTypeSelectorin interfaceorg.jhotdraw8.fxbase.styleable.StyleableBean
-
setCachedLayoutBounds
protected @Nullable javafx.geometry.Bounds setCachedLayoutBounds(javafx.geometry.Bounds newValue) -
getLayoutBounds
public javafx.geometry.Bounds getLayoutBounds()- Specified by:
getLayoutBoundsin interfaceFigure
-
getBoundsInLocal
public javafx.geometry.Bounds getBoundsInLocal()- Specified by:
getBoundsInLocalin interfaceFigure
-
getCssLayoutBounds
- Specified by:
getCssLayoutBoundsin interfaceFigure
-
computeLayoutBounds
public javafx.geometry.Bounds computeLayoutBounds()Computes the bounds of the node for layout calculations. These bounds include the text of the node and the padding.- Returns:
- the layout bounds
-
computeLayoutBounds
protected javafx.geometry.Bounds computeLayoutBounds(RenderContext ctx, javafx.scene.text.Text textNode) -
getTextBounds
Returns the bounds of the text node for layout calculations. These bounds only includes the text - without padding.- Parameters:
ctx- the render context- Returns:
- the layout bounds of the text
-
getPathIterator
- Specified by:
getPathIteratorin interfacePathIterableFigure
-
getText
-
layout
-
reshapeInLocal
public void reshapeInLocal(org.jhotdraw8.css.value.CssSize x, org.jhotdraw8.css.value.CssSize y, org.jhotdraw8.css.value.CssSize width, org.jhotdraw8.css.value.CssSize height) - Specified by:
reshapeInLocalin interfaceFigure
-
translateInLocal
- Specified by:
translateInLocalin interfaceFigure
-
updateGroupNode
-
updateNode
- Specified by:
updateNodein interfaceFigure
-
updateTextNode
-