Class HSLFAutoShape

All Implemented Interfaces:
Iterable<HSLFTextParagraph>, IAdjustableShape, AutoShape<HSLFShape,HSLFTextParagraph>, PlaceableShape<HSLFShape,HSLFTextParagraph>, Shape<HSLFShape,HSLFTextParagraph>, SimpleShape<HSLFShape,HSLFTextParagraph>, TextShape<HSLFShape,HSLFTextParagraph>
Direct Known Subclasses:
HSLFFreeformShape, Polygon

public class HSLFAutoShape extends HSLFTextShape implements AutoShape<HSLFShape,HSLFTextParagraph>
Represents an AutoShape.

AutoShapes are drawing objects with a particular shape that may be customized through smart resizing and adjustments. See ShapeTypes

Author:
Yegor Kozlov
  • Constructor Details

  • Method Details

    • createSpContainer

      protected EscherContainerRecord createSpContainer(ShapeType shapeType, boolean isChild)
    • setDefaultTextProperties

      protected void setDefaultTextProperties(HSLFTextParagraph _txtrun)
      Description copied from class: HSLFTextShape
      Set default properties for the TextRun. Depending on the text and shape type the defaults are different: TextBox: align=left, valign=top AutoShape: align=center, valign=middle
      Overrides:
      setDefaultTextProperties in class HSLFTextShape
    • getAdjustmentValue

      public int getAdjustmentValue(int idx)
      Gets adjust value which controls smart resizing of the auto-shape.

      The adjustment values are given in shape coordinates: the origin is at the top-left, positive-x is to the right, positive-y is down. The region from (0,0) to (S,S) maps to the geometry box of the shape (S=21600 is a constant).

      Parameters:
      idx - the adjust index in the [0, 9] range
      Returns:
      the adjustment value
    • setAdjustmentValue

      public void setAdjustmentValue(int idx, int val)
      Sets adjust value which controls smart resizing of the auto-shape.

      The adjustment values are given in shape coordinates: the origin is at the top-left, positive-x is to the right, positive-y is down. The region from (0,0) to (S,S) maps to the geometry box of the shape (S=21600 is a constant).

      Parameters:
      idx - the adjust index in the [0, 9] range
      val - the adjustment value