Class XDGFText


  • public class XDGFText
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      XDGFText​(com.microsoft.schemas.office.visio.x2012.main.TextType text, XDGFShape parent)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(java.awt.Graphics2D graphics)
      When calling this to draw text, it assumes graphics is set properly to draw in the right style.
      java.awt.geom.Path2D.Double getBoundsAsPath()  
      java.awt.geom.Rectangle2D.Double getTextBounds()
      These are in the shape coordinate system
      java.awt.geom.Point2D.Double getTextCenter()  
      java.lang.String getTextContent()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XDGFText

        public XDGFText​(com.microsoft.schemas.office.visio.x2012.main.TextType text,
                        XDGFShape parent)
    • Method Detail

      • getTextContent

        public java.lang.String getTextContent()
      • getBoundsAsPath

        public java.awt.geom.Path2D.Double getBoundsAsPath()
        Returns:
        Text bounds as a path in local coordinates, which is useful if you need to transform to global coordinates
      • getTextCenter

        public java.awt.geom.Point2D.Double getTextCenter()
        Returns:
        Center of text in local coordinates
      • draw

        public void draw​(java.awt.Graphics2D graphics)
        When calling this to draw text, it assumes graphics is set properly to draw in the right style.