org.apache.poi.sl.usermodel
Interface TextShape<S extends Shape<S,P>,P extends TextParagraph<S,P,?>>

All Superinterfaces:
IAdjustableShape, java.lang.Iterable<P>, PlaceableShape<S,P>, Shape<S,P>, SimpleShape<S,P>
All Known Subinterfaces:
AutoShape<S,P>, FreeformShape<S,P>, Line<S,P>, TableCell<S,P>, TextBox<S,P>
All Known Implementing Classes:
HSLFAutoShape, HSLFFreeformShape, HSLFLine, HSLFTableCell, HSLFTextBox, HSLFTextShape, Placeholder, Polygon, XSLFAutoShape, XSLFFreeformShape, XSLFTableCell, XSLFTextBox, XSLFTextShape

public interface TextShape<S extends Shape<S,P>,P extends TextParagraph<S,P,?>>
extends SimpleShape<S,P>, java.lang.Iterable<P>


Nested Class Summary
static class TextShape.TextAutofit
          Specifies alist of auto-fit types.
static class TextShape.TextDirection
          Vertical Text Types
 
Method Summary
 Insets2D getInsets()
           
 TextShape.TextDirection getTextDirection()
           
 double getTextHeight()
          Compute the cumulative height occupied by the text
 java.util.List<? extends TextParagraph<S,P,?>> getTextParagraphs()
           
 VerticalAlignment getVerticalAlignment()
          Returns the type of vertical alignment for the text.
 boolean getWordWrap()
           
 boolean isHorizontalCentered()
          Returns if the text is centered.
 
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
getFillStyle, getGeometry, getLineDecoration, getShadow, getShapeType, getStrokeStyle, isPlaceholder
 
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
getAnchor, getParent, getSheet
 
Methods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape
getAdjustValue
 
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getTextParagraphs

java.util.List<? extends TextParagraph<S,P,?>> getTextParagraphs()
Returns:
the TextParagraphs for this text box

getInsets

Insets2D getInsets()
Returns:
text shape margin

getTextHeight

double getTextHeight()
Compute the cumulative height occupied by the text


getVerticalAlignment

VerticalAlignment getVerticalAlignment()
Returns the type of vertical alignment for the text.

Returns:
the type of vertical alignment

isHorizontalCentered

boolean isHorizontalCentered()
Returns if the text is centered. If true and if the individual paragraph settings allow it, the whole text block will be displayed centered, i.e. its left and right margin will be maximized while still keeping the alignment of the paragraphs

Returns:
true, if the text anchor is horizontal centered

getWordWrap

boolean getWordWrap()
Returns:
whether to wrap words within the bounding rectangle

getTextDirection

TextShape.TextDirection getTextDirection()
Returns:
vertical orientation of the text


Copyright 2015 The Apache Software Foundation or its licensors, as applicable.