Class SvgTextFigure

java.lang.Object
org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
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

Represents an SVG 'text' element.
Author:
Werner Randelshofer
  • Field Details

  • Constructor Details

    • SvgTextFigure

      public SvgTextFigure()
    • SvgTextFigure

      public SvgTextFigure(javafx.geometry.Point2D position)
    • SvgTextFigure

      public SvgTextFigure(double x, double y)
  • Method Details

    • createNode

      public javafx.scene.Node createNode(RenderContext drawingView)
      Specified by:
      createNode in interface Figure
    • getCachedLayoutBounds

      protected @Nullable javafx.geometry.Bounds getCachedLayoutBounds()
    • getTypeSelector

      public String getTypeSelector()
      Specified by:
      getTypeSelector in interface org.jhotdraw8.fxbase.styleable.StyleableBean
    • setCachedLayoutBounds

      protected @Nullable javafx.geometry.Bounds setCachedLayoutBounds(javafx.geometry.Bounds newValue)
    • getLayoutBounds

      public javafx.geometry.Bounds getLayoutBounds()
      Specified by:
      getLayoutBounds in interface Figure
    • getBoundsInLocal

      public javafx.geometry.Bounds getBoundsInLocal()
      Specified by:
      getBoundsInLocal in interface Figure
    • getCssLayoutBounds

      public CssRectangle2D getCssLayoutBounds()
      Specified by:
      getCssLayoutBounds in interface Figure
    • 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

      protected javafx.geometry.Bounds getTextBounds(@Nullable RenderContext ctx)
      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 PathIterator getPathIterator(RenderContext ctx, @Nullable AffineTransform tx)
      Specified by:
      getPathIterator in interface PathIterableFigure
    • getText

      protected @Nullable String getText(RenderContext ctx)
    • layout

      public void layout(RenderContext ctx)
      Specified by:
      layout in interface Figure
    • 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:
      reshapeInLocal in interface Figure
    • translateInLocal

      public void translateInLocal(CssPoint2D delta)
      Specified by:
      translateInLocal in interface Figure
    • updateGroupNode

      protected void updateGroupNode(RenderContext ctx, javafx.scene.Group node)
    • updateNode

      public void updateNode(RenderContext ctx, javafx.scene.Node node)
      Specified by:
      updateNode in interface Figure
    • updateTextNode

      protected void updateTextNode(RenderContext ctx, javafx.scene.text.Text tn)