com.aspose.slides
Class TextHolder

java.lang.Object
  extended by com.aspose.slides.Placeholder
      extended by com.aspose.slides.TextHolder
All Implemented Interfaces:
IPlaceholder, IShape, IShapeFormat, ITextBox

public final class TextHolder
extends Placeholder
implements ITextBox

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.
 float getMarginBottom()
          Returns the bottom margin (mm) of text in a TextHolder.
 float getMarginLeft()
          Returns the left margin (mm) of text in a TextHolder.
 float getMarginRight()
          Returns the right margin (mm) of text in a TextHolder.
 float getMarginTop()
          Returns the top margin (mm) of text in a TextHolder.
 Paragraphs getParagraphs()
          Returns the list of all paragraphs in a frame.
 BaseSlide 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(float value)
          Sets the bottom margin (mm) of text in a TextHolder.
 void setMarginLeft(float value)
          Sets the left margin (mm) of text in a TextHolder.
 void setMarginRight(float value)
          Sets the right margin (mm) of text in a TextHolder.
 void setMarginTop(float value)
          Sets the top margin (mm) of text in a TextHolder.
 void setRotateTextBy90Degrees(boolean value)
          Sets whether the text should be rotated by 90 degree inside TextHolder.
 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.
 
Methods inherited from class com.aspose.slides.Placeholder
getAlternativeText, getFillFormat, getLineFormat, getMasterShapeId, 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.

Specified by:
getParagraphs in interface ITextBox
Returns:
The paragraph list.

getLinks

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

Returns:
The links list.

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 compatibility.

Returns:
a list of tabulation defined for a textholder.

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.

getX

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

Specified by:
getX in interface IShape
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.

Specified by:
setX in interface IShape
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.

Specified by:
getY in interface IShape
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.

Specified by:
setY in interface IShape
Overrides:
setY in class Placeholder
Parameters:
value - new y coordinate.

getWidth

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

Specified by:
getWidth in interface IShape
Overrides:
getWidth in class Placeholder
Returns:
The width of a TextHolder.

setWidth

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

Specified by:
setWidth in interface IShape
Overrides:
setWidth in class Placeholder
Parameters:
value - new width of a TextHolder.

getHeight

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

Specified by:
getHeight in interface IShape
Overrides:
getHeight in class Placeholder
Returns:
The height of a TextHolder.

setHeight

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

Specified by:
setHeight in interface IShape
Overrides:
setHeight in class Placeholder
Parameters:
value - new height of a TextHolder.

getMarginLeft

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

Returns:
The left margin.

setMarginLeft

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

Parameters:
value - new left margin.
Throws:
PptPropertyException

getMarginRight

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

Returns:
The right margin.

setMarginRight

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

Parameters:
value - new right margin.
Throws:
PptPropertyException

getMarginTop

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

Returns:
The top margin.

setMarginTop

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

Parameters:
value - new top margin.
Throws:
PptPropertyException

getMarginBottom

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

Returns:
The bottom margin.

setMarginBottom

public void setMarginBottom(float 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)
Sets whether the text should be rotated by 90 degree inside TextHolder. True to rotate text of TextHolder by 90 degree.


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.

Specified by:
getTextRuler in interface ITextBox

getSlide

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

Specified by:
getSlide in interface ITextBox