Class HSSFTextbox

All Implemented Interfaces:
Shape, SimpleShape
Direct Known Subclasses:
HSSFComment

public class HSSFTextbox extends HSSFSimpleShape
A textbox is a shape that may hold a rich text string.
  • Field Details

    • OBJECT_TYPE_TEXT

      public static final short OBJECT_TYPE_TEXT
      See Also:
    • HORIZONTAL_ALIGNMENT_LEFT

      public static final short HORIZONTAL_ALIGNMENT_LEFT
      How to align text horizontally
      See Also:
    • HORIZONTAL_ALIGNMENT_CENTERED

      public static final short HORIZONTAL_ALIGNMENT_CENTERED
      See Also:
    • HORIZONTAL_ALIGNMENT_RIGHT

      public static final short HORIZONTAL_ALIGNMENT_RIGHT
      See Also:
    • HORIZONTAL_ALIGNMENT_JUSTIFIED

      public static final short HORIZONTAL_ALIGNMENT_JUSTIFIED
      See Also:
    • HORIZONTAL_ALIGNMENT_DISTRIBUTED

      public static final short HORIZONTAL_ALIGNMENT_DISTRIBUTED
      See Also:
    • VERTICAL_ALIGNMENT_TOP

      public static final short VERTICAL_ALIGNMENT_TOP
      How to align text vertically
      See Also:
    • VERTICAL_ALIGNMENT_CENTER

      public static final short VERTICAL_ALIGNMENT_CENTER
      See Also:
    • VERTICAL_ALIGNMENT_BOTTOM

      public static final short VERTICAL_ALIGNMENT_BOTTOM
      See Also:
    • VERTICAL_ALIGNMENT_JUSTIFY

      public static final short VERTICAL_ALIGNMENT_JUSTIFY
      See Also:
    • VERTICAL_ALIGNMENT_DISTRIBUTED

      public static final short VERTICAL_ALIGNMENT_DISTRIBUTED
      See Also:
  • Constructor Details

    • HSSFTextbox

      public HSSFTextbox(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord)
    • HSSFTextbox

      public HSSFTextbox(HSSFShape parent, HSSFAnchor anchor)
      Construct a new textbox with the given parent and anchor.
      Parameters:
      parent -
      anchor - One of HSSFClientAnchor or HSSFChildAnchor
  • Method Details

    • createObjRecord

      protected ObjRecord createObjRecord()
      Overrides:
      createObjRecord in class HSSFSimpleShape
    • createSpContainer

      protected EscherContainerRecord createSpContainer()
      Overrides:
      createSpContainer in class HSSFSimpleShape
    • getMarginLeft

      public int getMarginLeft()
      Returns:
      Returns the left margin within the textbox.
    • setMarginLeft

      public void setMarginLeft(int marginLeft)
      Sets the left margin within the textbox.
    • getMarginRight

      public int getMarginRight()
      Returns:
      returns the right margin within the textbox.
    • setMarginRight

      public void setMarginRight(int marginRight)
      Sets the right margin within the textbox.
    • getMarginTop

      public int getMarginTop()
      Returns:
      returns the top margin within the textbox.
    • setMarginTop

      public void setMarginTop(int marginTop)
      Sets the top margin within the textbox.
    • getMarginBottom

      public int getMarginBottom()
      Gets the bottom margin within the textbox.
    • setMarginBottom

      public void setMarginBottom(int marginBottom)
      Sets the bottom margin within the textbox.
    • getHorizontalAlignment

      public short getHorizontalAlignment()
      Gets the horizontal alignment.
    • setHorizontalAlignment

      public void setHorizontalAlignment(short align)
      Sets the horizontal alignment.
    • getVerticalAlignment

      public short getVerticalAlignment()
      Gets the vertical alignment.
    • setVerticalAlignment

      public void setVerticalAlignment(short align)
      Sets the vertical alignment.
    • setShapeType

      public void setShapeType(int shapeType)
      Overrides:
      setShapeType in class HSSFSimpleShape
      Parameters:
      shapeType - - shapeType
      See Also:
    • cloneShape

      protected HSSFShape cloneShape()
      Overrides:
      cloneShape in class HSSFSimpleShape
    • afterRemove

      protected void afterRemove(HSSFPatriarch patriarch)
      Description copied from class: HSSFShape
      remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes
      Overrides:
      afterRemove in class HSSFSimpleShape