com.aspose.slides
Class TextHolder

java.lang.Object
  extended by com.aspose.slides.Placeholder
      extended by com.aspose.slides.TextHolder

public final class TextHolder
extends Placeholder

Represents the text placeholder.


Method Summary
 void fitTextToShape()
          Decreases Paragraph's SpaceWithin and/or FontHeight to fit text to a TextHolder's rectangle.
 int getAnchorText()
          Returns the anchor text in a TextHolder.
 EffectiveTabs getEffectiveTabs(int ParagraphNumber)
          Returns a list of tabulations for a paragraph, including implicitly generated.
 int getHeight()
          Returns the height of a TextHolder.
 Links getLinks()
          Returns the list of all links in a frame.
 double getMarginBottom()
          Returns the bottom margin (mm) of text in a TextHolder.
 double getMarginLeft()
          Returns the left margin (mm) of text in a TextHolder.
 double getMarginRight()
          Returns the right margin (mm) of text in a TextHolder.
 double getMarginTop()
          Returns the top margin (mm) of text in a TextHolder.
 com.aspose.slides.LevelStyle getMasterStyle(short depth)
          Returns LevelStyle from master slide.
 Paragraphs getParagraphs()
          Returns the list of all paragraphs in a frame.
 Slide getSlide()
          Returns the parent Slide for a TextHolder.
 Tabs getTabs()
          Deprecated. Use TextRuler.Tabs property instead.
 java.lang.String getText()
          Returns the plain text for a TextHolder.
 TextRuler getTextRuler()
          Returns the TextRuler of a textholder.
 int getWidth()
          Returns the width of a TextHolder.
 int getX()
          Returns the x-coordinate of the upper-left corner of a TextHolder.
 int getY()
          Returns the y-coordinate of the upper-left corner of a TextHolder.
 boolean isFitShapeToText()
          Determines whether the size of TextHolder should be fit to the text size.
 boolean isRotateTextBy90Degrees()
          Determines whether the text should be rotated by 90 degree inside TextHolder.
 boolean isWrapText()
          Determines whether the text should be wrapped at TextHolder's margins.
 void setAnchorText(int value)
          Sets the anchor text in a TextHolder.
 void setFitShapeToText(boolean value)
          Sets whether the size of TextHolder should be fit to the text size.
 void setHeight(int value)
          Sets the height of a TextHolder.
 void setMarginBottom(double value)
          Sets the bottom margin (mm) of text in a TextHolder.
 void setMarginLeft(double value)
          Sets the left margin (mm) of text in a TextHolder.
 void setMarginRight(double value)
          Sets the right margin (mm) of text in a TextHolder.
 void setMarginTop(double value)
          Sets the top margin (mm) of text in a TextHolder.
 void setRotateTextBy90Degrees(boolean value)
           
 void setText(java.lang.String value)
          Sets the plain text for a TextHolder.
 void setWidth(int value)
          Sets the width of a TextHolder.
 void setWrapText(boolean value)
          Sets whether the text should be wrapped at TextHolder's margins.
 void setX(int value)
          Sets the x-coordinate of the upper-left corner of a TextHolder.
 void setY(int value)
          Sets the y-coordinate of the upper-left corner of a TextHolder.
 void textChanged()
          Recalculates text parameters in a TextHolder.
 
Methods inherited from class com.aspose.slides.Placeholder
getAlternativeText, getFillFormat, getLineFormat, getParent, getPlaceholderType, getShadowFormat, getShapeRef, getThreeDFormat, setAlternativeText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getText

public java.lang.String getText()
Returns the plain text for a TextHolder.

Returns:
The plain text.

setText

public void setText(java.lang.String value)
Sets the plain text for a TextHolder.

Parameters:
value - the plain text.

getParagraphs

public Paragraphs getParagraphs()
Returns the list of all paragraphs in a frame.

Returns:
The paragraph list. See Paragraphs.

getLinks

public Links getLinks()
Returns the list of all links in a frame.

Returns:
The links list. See Links.

getTabs

public Tabs getTabs()
Deprecated. Use TextRuler.Tabs property instead.

Returns a list of tabulation defined for a textholder. This value is a shortcut to TextRuler.Tabs property left for compartiblity.

Returns:
a list of tabulation defined for a textholder. See Tabs.

getEffectiveTabs

public EffectiveTabs getEffectiveTabs(int ParagraphNumber)
Returns a list of tabulations for a paragraph, including implicitly generated.

Parameters:
ParagraphNumber - Index of paragraph, for which tabulation positions will be generated.
Returns:
a list of tabulations for a paragraph. See EffectiveTabs.

getX

public int getX()
Returns the x-coordinate of the upper-left corner of a TextHolder.

Overrides:
getX in class Placeholder
Returns:
The x coordinate.

setX

public void setX(int value)
Sets the x-coordinate of the upper-left corner of a TextHolder.

Overrides:
setX in class Placeholder
Parameters:
value - new x coordinate.

getY

public int getY()
Returns the y-coordinate of the upper-left corner of a TextHolder.

Overrides:
getY in class Placeholder
Returns:
The y coordinate.

setY

public void setY(int value)
Sets the y-coordinate of the upper-left corner of a TextHolder.

Overrides:
setY in class Placeholder
Parameters:
value - new y coordinate.

getWidth

public int getWidth()
Returns the width of a TextHolder.

Overrides:
getWidth in class Placeholder
Returns:
The width of a TextHolder.

setWidth

public void setWidth(int value)
Sets the width of a TextHolder.

Overrides:
setWidth in class Placeholder
Parameters:
value - new width of a TextHolder.

getHeight

public int getHeight()
Returns the height of a TextHolder.

Overrides:
getHeight in class Placeholder
Returns:
The height of a TextHolder.

setHeight

public void setHeight(int value)
Sets the height of a TextHolder.

Overrides:
setHeight in class Placeholder
Parameters:
value - new height of a TextHolder.

getMarginLeft

public double getMarginLeft()
Returns the left margin (mm) of text in a TextHolder.

Returns:
The left margin.

setMarginLeft

public void setMarginLeft(double value)
                   throws PptPropertyException
Sets the left margin (mm) of text in a TextHolder.

Parameters:
value - new left margin.
Throws:
PptPropertyException

getMarginRight

public double getMarginRight()
Returns the right margin (mm) of text in a TextHolder.

Returns:
The right margin.

setMarginRight

public void setMarginRight(double value)
                    throws PptPropertyException
Sets the right margin (mm) of text in a TextHolder.

Parameters:
value - new right margin.
Throws:
PptPropertyException

getMarginTop

public double getMarginTop()
Returns the top margin (mm) of text in a TextHolder.

Returns:
The top margin.

setMarginTop

public void setMarginTop(double value)
                  throws PptPropertyException
Sets the top margin (mm) of text in a TextHolder.

Parameters:
value - new top margin.
Throws:
PptPropertyException

getMarginBottom

public double getMarginBottom()
Returns the bottom margin (mm) of text in a TextHolder.

Returns:
The bottom margin.

setMarginBottom

public void setMarginBottom(double value)
                     throws PptPropertyException
Sets the bottom margin (mm) of text in a TextHolder.

Parameters:
value - new bottom margin.
Throws:
PptPropertyException

getAnchorText

public int getAnchorText()
Returns the anchor text in a TextHolder.

Returns:
The text anchor. See AnchorText.

setAnchorText

public void setAnchorText(int value)
Sets the anchor text in a TextHolder.

Parameters:
value - new text anchor. See AnchorText.

isWrapText

public boolean isWrapText()
Determines whether the text should be wrapped at TextHolder's margins.

Returns:
true if text should be wrapped.

setWrapText

public void setWrapText(boolean value)
Sets whether the text should be wrapped at TextHolder's margins.

Parameters:
value - true to wrap the text.

isFitShapeToText

public boolean isFitShapeToText()
Determines whether the size of TextHolder should be fit to the text size.

Returns:
false if TextHolder size fitted to the text.

setFitShapeToText

public void setFitShapeToText(boolean value)
Sets whether the size of TextHolder should be fit to the text size.

Parameters:
value - true to fit TextHolder's size to the text.

isRotateTextBy90Degrees

public boolean isRotateTextBy90Degrees()
Determines whether the text should be rotated by 90 degree inside TextHolder. True to rotate text of TextHolder by 90 degree.


setRotateTextBy90Degrees

public void setRotateTextBy90Degrees(boolean value)

fitTextToShape

public void fitTextToShape()
Decreases Paragraph's SpaceWithin and/or FontHeight to fit text to a TextHolder'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 textholder.


getSlide

public Slide getSlide()
Returns the parent Slide for a TextHolder.

Returns:
the parent Slide.

getMasterStyle

public com.aspose.slides.LevelStyle getMasterStyle(short depth)
Returns LevelStyle from master slide.

Parameters:
depth - Depth level of text.
Returns:
LevelStyle object.

textChanged

public void textChanged()
Recalculates text parameters in a TextHolder.