Class DrawTextFragment

java.lang.Object
org.apache.poi.sl.draw.DrawTextFragment
All Implemented Interfaces:
Drawable

public class DrawTextFragment extends Object implements Drawable
  • Constructor Details

  • Method Details

    • setPosition

      public void setPosition(double x, double y)
    • draw

      public void draw(Graphics2D graphics)
      Description copied from interface: Drawable
      Draw this shape into the supplied canvas
      Specified by:
      draw in interface Drawable
      Parameters:
      graphics - the graphics to draw into
    • applyTransform

      public void applyTransform(Graphics2D graphics)
      Description copied from interface: Drawable
      Apply 2-D transforms before drawing this shape. This includes rotation and flipping.
      Specified by:
      applyTransform in interface Drawable
      Parameters:
      graphics - the graphics whos transform matrix will be modified
    • drawContent

      public void drawContent(Graphics2D graphics)
      Description copied from interface: Drawable
      draw any content within this shape (image, text, etc.).
      Specified by:
      drawContent in interface Drawable
      Parameters:
      graphics - the graphics to draw into
    • getLayout

      public TextLayout getLayout()
    • getAttributedString

      public AttributedString getAttributedString()
    • getHeight

      public float getHeight()
      Returns:
      full height of this text run which is sum of ascent, descent and leading
    • getLeading

      public float getLeading()
      Returns:
      the leading height before/after a text line
    • getWidth

      public float getWidth()
      Returns:
      width if this text run
    • getString

      public String getString()
      Returns:
      the string to be painted
    • toString

      public String toString()
      Overrides:
      toString in class Object