com.aspose.slides
Class TextFrame

java.lang.Object
  extended by com.aspose.slides.Shape
      extended by com.aspose.slides.TextFrame
All Implemented Interfaces:
IShape, IShapeFormat, ITextBox

public final class TextFrame
extends Shape
implements ITextBox

Represents a TextFrame shape.


Method Summary
 TextFrame addTextFrame(java.lang.String text)
           Adds a new TextFrame to a shape.
 void fitTextToShape()
           Decreases Paragraph's SpaceWithin and/or FontHeight to fit text to a TextFrame's rectangle.
 int getAnchorText()
           Returns or sets anchor text in a TextFrame.
 int getDateTimePosition()
          Deprecated. 
 EffectiveTabs getEffectiveTabs(int ParagraphNumber)
           Returns the list of tabulations for a paragraph, including implicitly generated.
 int getFontRotation()
           Additional rotation of text in a shape.
 int getFooterPosition()
          Deprecated. 
 int getFrameType()
           
 int getGenericDatePosition()
          Deprecated. 
 int getHeaderPosition()
          Deprecated. 
 Links getLinks()
           Returns the list of all links in a frame.
 double getMarginBottom()
           Returns or sets bottom margin (mm) in a TextFrame.
 double getMarginLeft()
           Returns or sets left margin (mm) in a TextFrame.
 double getMarginRight()
           Returns or sets right margin (mm) in a TextFrame.
 double getMarginTop()
           Returns or sets top margin (mm) in a TextFrame.
 com.aspose.slides.ppt.LevelStyle getMasterStyle(short depth)
           
 MetaCharacters getMetaCharacters()
           Returns the key-value collection of meta characters.
 Paragraphs getParagraphs()
           Returns the list of all paragraphs in a frame.
 Shape getParentShape()
           Returns parent shape of a text frame.
 BaseSlide getSlide()
          Returns the parent Slide of a text box.
 int getSlideNumberPosition()
          Deprecated. 
 java.lang.String getText()
           Gets or sets the plain text of a TextFrame.
 TextRuler getTextRuler()
           Returns the TextRuler of a TextFrame.
 boolean isFitShapeToText()
           <b>True</b> to fit size of TextFrame to text size.
 boolean isRotateTextBy90Degrees()
           <b>True</b> to rotate text of TextFrame by 90 degree.
 boolean isWrapText()
           <b>True</b> if text is wrapped at TextFrame's margins.
 void setAnchorText(int value)
           
 void setFitShapeToText(boolean value)
           
 void setFontRotation(int value)
           
 void setMarginBottom(double value)
           
 void setMarginLeft(double value)
           
 void setMarginRight(double value)
           
 void setMarginTop(double value)
           
 void setRotateTextBy90Degrees(boolean value)
           
 void setText(java.lang.String value)
           
 void setWrapText(boolean value)
           
 void textChanged()
           
 
Methods inherited from class com.aspose.slides.Shape
addLink, clearLink, createShapeElements, createShapeElements, getAlternativeText, getAnimationSettings, getConnectionSites, getConnectionSitesRaw, getFillFormat, getHeight, getLineFormat, getLink, getMasterShapeId, getName, getParent, getPlaceholder, getProtection, getRotation, getShadowFormat, getShapeId, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, hasExternalData, isFlipHorizontal, isFlipVertical, isHidden, isMasterTextHolder, isTextHolder, serialize, setAlternativeText, setFlipHorizontal, setFlipVertical, setHeight, setHidden, setName, setProtection, setRotation, setWidth, setX, setY, zOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParagraphs

public Paragraphs getParagraphs()

Returns the list of all paragraphs in a frame. Read-only Aspose.Slides.Paragraphs.

Specified by:
getParagraphs in interface ITextBox

getLinks

public Links getLinks()

Returns the list of all links in a frame. Read-only Aspose.Slides.LinkCollection.


getEffectiveTabs

public EffectiveTabs getEffectiveTabs(int ParagraphNumber)

Returns the list of tabulations for a paragraph, including implicitly generated.

Parameters:
ParagraphNumber - Index of paragraph, for which tabulation positions will be generated.
Returns:
Aspose.Slides.EffectiveTabs object.

getText

public java.lang.String getText()

Gets or sets the plain text of a TextFrame.

Value: The text.


setText

public void setText(java.lang.String value)

getMetaCharacters

public MetaCharacters getMetaCharacters()

Returns the key-value collection of meta characters. Key is a position of meta character in a TextFrame, and value is a type (MetaCharacterType) of meta character. If a TextFrame doesn't contain meta characters this property has null value.


getSlideNumberPosition

@Deprecated
public int getSlideNumberPosition()
Deprecated. 

Returns the position of a SlideNumber meta character in a TextFrame. -1 if a TextFrame doesn't contain SlideNumber meta character. MS PowerPoint uses '*' as meta character. Read-only int.


getDateTimePosition

@Deprecated
public int getDateTimePosition()
Deprecated. 

Returns the position of a DateTime meta character in a TextFrame. -1 if a TextFrame doesn't contain DateTime meta character. MS PowerPoint uses '*' as meta character. Read-only int.


getGenericDatePosition

@Deprecated
public int getGenericDatePosition()
Deprecated. 

Returns the position of a GenericDate meta character in a TextFrame. -1 if a TextFrame doesn't contain GenericDate meta character. MS PowerPoint uses '*' as meta character. Read-only int.


getHeaderPosition

@Deprecated
public int getHeaderPosition()
Deprecated. 

Returns the position of a Header meta character in a TextFrame. -1 if a TextFrame doesn't contain Header meta character. MS PowerPoint uses '*' as meta character. Read-only int.


getFooterPosition

@Deprecated
public int getFooterPosition()
Deprecated. 

Returns the position of a Footer meta character in a TextFrame. -1 if a TextFrame doesn't contain Footer meta character. MS PowerPoint uses '*' as meta character. Read-only int.


getMarginLeft

public double getMarginLeft()

Returns or sets left margin (mm) in a TextFrame. Read/write double.


setMarginLeft

public void setMarginLeft(double value)

getMarginRight

public double getMarginRight()

Returns or sets right margin (mm) in a TextFrame. Read/write double.


setMarginRight

public void setMarginRight(double value)

getMarginTop

public double getMarginTop()

Returns or sets top margin (mm) in a TextFrame. Read/write double.


setMarginTop

public void setMarginTop(double value)

getMarginBottom

public double getMarginBottom()

Returns or sets bottom margin (mm) in a TextFrame. Read/write double.


setMarginBottom

public void setMarginBottom(double value)

getAnchorText

public int getAnchorText()

Returns or sets anchor text in a TextFrame. Read/write Aspose.Slides.AnchorText.


setAnchorText

public void setAnchorText(int value)

isWrapText

public boolean isWrapText()

<b>True</b> if text is wrapped at TextFrame's margins. Read/write bool.


setWrapText

public void setWrapText(boolean value)

isFitShapeToText

public boolean isFitShapeToText()

<b>True</b> to fit size of TextFrame to text size. Read/write bool.


setFitShapeToText

public void setFitShapeToText(boolean value)

isRotateTextBy90Degrees

public boolean isRotateTextBy90Degrees()

<b>True</b> to rotate text of TextFrame by 90 degree. Read/write bool.


setRotateTextBy90Degrees

public void setRotateTextBy90Degrees(boolean value)

getFontRotation

public int getFontRotation()

Additional rotation of text in a shape. Can be 0, 90, 180 or 270 degrees. Read/write Aspose.Slides.FontRotationAngle.


setFontRotation

public void setFontRotation(int value)

addTextFrame

public TextFrame addTextFrame(java.lang.String text)

Adds a new TextFrame to a shape. If shape already has TextFrame then do nothing.

Overrides:
addTextFrame in class Shape
Parameters:
text - Default text for a new TextFrame.

getParentShape

public Shape getParentShape()

Returns parent shape of a text frame. Read-only Shape.


fitTextToShape

public void fitTextToShape()

Decreases Paragraph's SpaceWithin and/or FontHeight to fit text to a TextFrame's rectangle. SpaceWithin decrement affects only line-based intervals and can decrease them down to 80 percent.


getTextRuler

public TextRuler getTextRuler()

Returns the TextRuler of a TextFrame. Read-only TextRuler

Specified by:
getTextRuler in interface ITextBox

getMasterStyle

public com.aspose.slides.ppt.LevelStyle getMasterStyle(short depth)

getFrameType

public int getFrameType()

getSlide

public BaseSlide getSlide()
Description copied from interface: ITextBox
Returns the parent Slide of a text box.

Specified by:
getSlide in interface ITextBox

textChanged

public void textChanged()