com.aspose.slides
Class TextFrame

java.lang.Object
  extended by com.aspose.slides.Shape
      extended by com.aspose.slides.TextFrame
All Implemented Interfaces:
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.
 boolean getFitShapeToText()
           <b>True</b> to fit size of TextFrame to text size.
 boolean getFlipHorizontal()
           <b>True</b> if a shape was flipped horizontally.
 boolean getFlipVertical()
           <b>True</b> if a shape was flipped vertically.
 int getFontRotation()
           Additional rotation of text in a shape.
 int getFooterPosition()
          Deprecated. 
 int getFrameType()
           
 int getGenericDatePosition()
          Deprecated. 
 int getHeaderPosition()
          Deprecated. 
 LinkCollection 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.LevelStyle getMasterStyle(short depth)
           
 MetaCharacterCollection getMetaCharacters()
           Returns the key-value collection of meta characters.
 ParagraphCollection getParagraphs()
           Returns the list of all paragraphs in a frame.
 Shape getParentShape()
           Returns parent shape of a text frame.
 boolean getRotateTextBy90Degrees()
           <b>True</b> to rotate text of TextFrame by 90 degree.
 int getRotation()
           Returns or sets the number of degrees the specified shape is rotated around the z-axis.
 BaseSlide getSlide()
           
 int getSlideNumberPosition()
          Deprecated. 
 TabCollection getTabs()
          Deprecated. 
 java.lang.String getText()
           Gets or sets the plain text of a TextFrame.
 TextRuler getTextRuler()
           Returns the TextRuler of a TextFrame.
 boolean getWrapText()
           <b>True</b> if text is wrapped at TextFrame's margins.
 void setAnchorText(int value)
           
 void setFitShapeToText(boolean value)
           
 void setFlipHorizontal(boolean value)
           
 void setFlipVertical(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 setRotation(int 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, getFlipH, getFlipV, getHeight, getHidden, getLineFormat, getLink, getMasterShapeId, getName, getParent, getParentSlide, getPlaceholder, getProtection, getShadowFormat, getShapeId, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, hasExternalData, isMasterTextHolder, isTextHolder, serialize, setAlternativeText, setFlipH, setFlipV, setHeight, setHidden, setName, setProtection, setWidth, setX, setY, zOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParagraphs

public ParagraphCollection getParagraphs()

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

Specified by:
getParagraphs in interface ITextBox

getLinks

public LinkCollection getLinks()

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


getTabs

@Deprecated
public TabCollection getTabs()
Deprecated. 

Returns the list of tabulations defined for a frame. Read-only Aspose.Slides.Tabs.


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 MetaCharacterCollection 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)

getWrapText

public boolean getWrapText()

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


setWrapText

public void setWrapText(boolean value)

getFitShapeToText

public boolean getFitShapeToText()

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


setFitShapeToText

public void setFitShapeToText(boolean value)

getRotateTextBy90Degrees

public boolean getRotateTextBy90Degrees()

<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


getFlipHorizontal

public boolean getFlipHorizontal()

<b>True</b> if a shape was flipped horizontally. Read/write bool.

Overrides:
getFlipHorizontal in class Shape

setFlipHorizontal

public void setFlipHorizontal(boolean value)
Overrides:
setFlipHorizontal in class Shape

getFlipVertical

public boolean getFlipVertical()

<b>True</b> if a shape was flipped vertically. Read/write bool.

Overrides:
getFlipVertical in class Shape

setFlipVertical

public void setFlipVertical(boolean value)
Overrides:
setFlipVertical in class Shape

getRotation

public int getRotation()

Returns or sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read/write int.

Overrides:
getRotation in class Shape

setRotation

public void setRotation(int value)
Overrides:
setRotation in class Shape

getMasterStyle

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

getFrameType

public int getFrameType()

getSlide

public BaseSlide getSlide()

textChanged

public void textChanged()