com.arctorus.documents
Class TextBox

java.lang.Object
  extended by com.arctorus.documents.TextBox

public final class TextBox
extends java.lang.Object

Text container in a shape.


Method Summary
 void addParagraph(Paragraph paragraph)
          Add new paragraph of a text.
 void addParagraphs(java.util.Collection<? extends Paragraph> paragraphsOther)
          Add new paragraphs to a text box.
 void clearText()
          Clear all text in a text box and removes all paragraphs.
 int getBottomMargin()
          Get bottom margin in a text box.
 int getLeftMargin()
          Get left margin in a text box.
 java.util.List<Paragraph> getParagraphs()
          Get list of all paragraphs in a text box.
 int getRightMargin()
          Get right margin in a text box.
 TextRotationType getTextRotationType()
          Get text rotation type in a text box.
 int getTopMargin()
          Get top margin in a text box.
 VerticalAlignmentType getVerticalAlignment()
          Get vertical text alignment in a text box.
 boolean hasText()
          Get whether a text box contains any paragraphs.
 boolean isFitShapeToText()
          Get whether the text box should be resized automatically to text size.
 boolean isWrapText()
          Get whether a long text should be wrapped in a text box.
 void setBottomMargin(int bottomMargin)
          Set bottom margin in a text box.
 void setFitShapeToText(boolean fitShapeToText)
          Get whether the text box should be resized automatically to text size.
 void setLeftMargin(int leftMargin)
          Set left margin in a text box.
 void setRightMargin(int rightMargin)
          Set right margin in a text box.
 void setTextRotationType(TextRotationType textRotationType)
          Set text rotation type in a text box.
 void setTopMargin(int topMargin)
          Set top margin in a text box.
 void setVerticalAlignment(VerticalAlignmentType verticalAlignment)
          Set vertical text alignment in a text box.
 void setWrapText(boolean wrapText)
          Set whether a long text should be wrapped in a text box.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getVerticalAlignment

public VerticalAlignmentType getVerticalAlignment()
Get vertical text alignment in a text box.


setVerticalAlignment

public void setVerticalAlignment(VerticalAlignmentType verticalAlignment)
Set vertical text alignment in a text box.

Parameters:
verticalAlignment - new vertical alignment.

addParagraph

public void addParagraph(Paragraph paragraph)
Add new paragraph of a text.

Parameters:
paragraph - new paragraph to add.

getParagraphs

public java.util.List<Paragraph> getParagraphs()
Get list of all paragraphs in a text box.


isWrapText

public boolean isWrapText()
Get whether a long text should be wrapped in a text box.


setWrapText

public void setWrapText(boolean wrapText)
Set whether a long text should be wrapped in a text box.

Parameters:
wrapText - true to wrap text in a shape.

hasText

public boolean hasText()
Get whether a text box contains any paragraphs.


getTextRotationType

public TextRotationType getTextRotationType()
Get text rotation type in a text box.


setTextRotationType

public void setTextRotationType(TextRotationType textRotationType)
Set text rotation type in a text box. Works for MS formats only.

Parameters:
textRotationType - new text rotation type.

getLeftMargin

public int getLeftMargin()
Get left margin in a text box.


setLeftMargin

public void setLeftMargin(int leftMargin)
Set left margin in a text box.

Parameters:
leftMargin - new margin.

getRightMargin

public int getRightMargin()
Get right margin in a text box.


setRightMargin

public void setRightMargin(int rightMargin)
Set right margin in a text box.

Parameters:
rightMargin - new margin.

getTopMargin

public int getTopMargin()
Get top margin in a text box.


setTopMargin

public void setTopMargin(int topMargin)
Set top margin in a text box.

Parameters:
topMargin - new margin.

getBottomMargin

public int getBottomMargin()
Get bottom margin in a text box.


setBottomMargin

public void setBottomMargin(int bottomMargin)
Set bottom margin in a text box.

Parameters:
bottomMargin - new margin.

clearText

public void clearText()
Clear all text in a text box and removes all paragraphs.


addParagraphs

public void addParagraphs(java.util.Collection<? extends Paragraph> paragraphsOther)
Add new paragraphs to a text box.

Parameters:
paragraphsOther - collection with paragraphs to add.

isFitShapeToText

public final boolean isFitShapeToText()
Get whether the text box should be resized automatically to text size. Real automatic shape resize works in the Microsoft Word only. For other formats just shape property will be set.


setFitShapeToText

public final void setFitShapeToText(boolean fitShapeToText)
Get whether the text box should be resized automatically to text size. Real automatic shape resize works in the Microsoft Word only. For other formats just shape property will be set.

Parameters:
fitShapeToText - true to resize shape.