Class HSLFTextBox

All Implemented Interfaces:
Iterable<HSLFTextParagraph>, IAdjustableShape, AutoShape<HSLFShape,HSLFTextParagraph>, PlaceableShape<HSLFShape,HSLFTextParagraph>, Shape<HSLFShape,HSLFTextParagraph>, SimpleShape<HSLFShape,HSLFTextParagraph>, TextBox<HSLFShape,HSLFTextParagraph>, TextShape<HSLFShape,HSLFTextParagraph>
Direct Known Subclasses:
HSLFPlaceholder, HSLFTableCell

public class HSLFTextBox extends HSLFTextShape implements TextBox<HSLFShape,HSLFTextParagraph>
Represents a TextFrame shape in PowerPoint.

Contains the text in a text frame as well as the properties and methods that control alignment and anchoring of the text.

Author:
Yegor Kozlov
  • Constructor Details

    • HSLFTextBox

      protected HSLFTextBox(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
      Create a TextBox object and initialize it from the supplied Record container.
      Parameters:
      escherRecord - EscherSpContainer container which holds information about this shape
      parent - the parent of the shape
    • HSLFTextBox

      public HSLFTextBox(ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
      Create a new TextBox. This constructor is used when a new shape is created.
      Parameters:
      parent - the parent of this Shape. For example, if this text box is a cell in a table then the parent is Table.
    • HSLFTextBox

      public HSLFTextBox()
      Create a new TextBox. This constructor is used when a new shape is created.
  • Method Details

    • createSpContainer

      protected EscherContainerRecord createSpContainer(boolean isChild)
      Create a new TextBox and initialize its internal structures
      Overrides:
      createSpContainer in class HSLFSimpleShape
      Parameters:
      isChild - true if the Line is inside a group, false otherwise
      Returns:
      the created EscherContainerRecord which holds shape data
    • 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