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 TypeFieldDescriptionThe CSS type selector for this object is "text".static final @NonNull CssSizeStyleableKeystatic final @NonNull 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(@NonNull javafx.geometry.Point2D position) -
Method Summary
Modifier and TypeMethodDescription@NonNull javafx.geometry.BoundsComputes the bounds of the node for layout calculations.protected @NonNull javafx.geometry.BoundscomputeLayoutBounds(@NonNull RenderContext ctx, javafx.scene.text.Text textNode) @NonNull javafx.scene.NodecreateNode(@NonNull RenderContext drawingView) @NonNull javafx.geometry.Boundsprotected @Nullable javafx.geometry.Bounds@NonNull javafx.geometry.BoundsgetText(@NonNull RenderContext ctx) protected @NonNull javafx.geometry.BoundsReturns the bounds of the text node for layout calculations.voidlayout(@NonNull RenderContext ctx) voidreshapeInLocal(@NonNull org.jhotdraw8.css.value.CssSize x, @NonNull org.jhotdraw8.css.value.CssSize y, @NonNull org.jhotdraw8.css.value.CssSize width, @NonNull org.jhotdraw8.css.value.CssSize height) protected @Nullable javafx.geometry.BoundssetCachedLayoutBounds(javafx.geometry.Bounds newValue) voidtranslateInLocal(@NonNull CssPoint2D delta) protected voidupdateGroupNode(@NonNull RenderContext ctx, javafx.scene.Group node) voidupdateNode(@NonNull RenderContext ctx, @NonNull javafx.scene.Node node) protected voidupdateTextNode(@NonNull RenderContext ctx, @NonNull 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, 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
-
SvgTextFigure
public SvgTextFigure(double x, double y)
-
-
Method Details
-
createNode
- Specified by:
createNodein interfaceFigure
-
getCachedLayoutBounds
-
getTypeSelector
- Specified by:
getTypeSelectorin interfaceorg.jhotdraw8.fxbase.styleable.StyleableBean
-
setCachedLayoutBounds
-
getLayoutBounds
- Specified by:
getLayoutBoundsin interfaceFigure
-
getBoundsInLocal
- Specified by:
getBoundsInLocalin interfaceFigure
-
getCssLayoutBounds
- Specified by:
getCssLayoutBoundsin interfaceFigure
-
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 @NonNull javafx.geometry.Bounds computeLayoutBounds(@NonNull 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
public @NonNull PathIterator getPathIterator(@NonNull RenderContext ctx, @Nullable AffineTransform tx) - Specified by:
getPathIteratorin interfacePathIterableFigure
-
getText
-
layout
-
reshapeInLocal
public void reshapeInLocal(@NonNull org.jhotdraw8.css.value.CssSize x, @NonNull org.jhotdraw8.css.value.CssSize y, @NonNull org.jhotdraw8.css.value.CssSize width, @NonNull org.jhotdraw8.css.value.CssSize height) - Specified by:
reshapeInLocalin interfaceFigure
-
translateInLocal
- Specified by:
translateInLocalin interfaceFigure
-
updateGroupNode
-
updateNode
- Specified by:
updateNodein interfaceFigure
-
updateTextNode
-