Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class TextInfo

java.lang.Object
  extended bycom.aspose.pdf.elements.TextInfo
All Implemented Interfaces:
java.lang.Cloneable

public class TextInfo
extends java.lang.Object
implements java.lang.Cloneable

Encapsulates info for a Text paragraph.


Constructor Summary
TextInfo()
          Initializes a new instance of the TextInfo class.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object arg0)
           
 int getAlignmentType()
          Gets an alignment type that indicates the text alignment mode when showed in box.
 Color getBackGroundColor()
          Gets the background color of the text paragraph.
 float getCharSpacing()
          Gets a float value that indicates space between charcters.The unit is point.
 float getFontSize()
          Gets a float number that indicates the size of font.
 float getLineSpacing()
          Gets float value that indicates the spacing between two text lines.
 Color getTextColor()
          Gets a Color object that indicates the color of the text.
 boolean isBold()
          Gets a bool value that indicates whether the TrueType font is bold.
 boolean isItalic()
          Gets a bool value that indicates whether the TrueType font is italic.
 boolean isOverLine()
          Gets a bool value that indicates whether the text is with overline.
 boolean isStrikeOut()
          Gets a bool value that indicates whether the text is with strikeout.
 boolean isUnderLine()
          Gets a bool value that indicates whether the text is with underline.
 void setAlignmentType(int alignmentType)
          Sets a alignment type that indicates the text alignment mode when showed in box.
 void setBackGroundColor(Color groundColor)
          Sets the background color of the text paragraph.
 void setBold(boolean bold)
          Sets a bool value that indicates whether the TrueType font is bold.
 void setCharSpacing(float spacing)
          Sets a float value that indicates space between charcters.The unit is point.
 void setFontSize(float fontSize)
          Sets a float number that indicates the size of font.
 void setItalic(boolean italic)
          Sets a bool value that indicates whether the TrueType font is italic.
 void setLineSpacing(float spacing)
          Sets a float value that indicates the spacing between two text lines.
 void setOverLine(boolean overLine)
          Sets a bool value that indicates whether the text is with overline.
 void setStrikeOut(boolean strikeOut)
          Sets a bool value that indicates whether the text is with strikeout.
 void setTextColor(Color color)
          Sets a Color object that indicates the color of the text.
 void setUnderLine(boolean underLine)
          Sets a bool value that indicates whether the text is with underline.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextInfo

public TextInfo()
Initializes a new instance of the TextInfo class.

 [SampleCode]
 Section sec1 = pdf.getSections().add();
 Text text1 = new Text(sec1);
 sec1.getParagraphs().add(text1);
 text1.getTextInfo().setTextColor(Color.Red);
 Segment seg1 = new Segment(text1,"seg1 ");
 text1.getSegments().add(seg1);
 Segment seg2 = new Segment(text1,"seg2 ");
 seg2.getTextInfo().setTextColor(Color.Green);
 text1.getSegments().add(seg2);
 

Method Detail

getAlignmentType

public int getAlignmentType()
Gets an alignment type that indicates the text alignment mode when showed in box.


setAlignmentType

public void setAlignmentType(int alignmentType)
Sets a alignment type that indicates the text alignment mode when showed in box.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException
See Also:
java.lang.Object#clone()

getFontSize

public float getFontSize()
Gets a float number that indicates the size of font. Unit is point. Default is 12.

Returns:
Returns the FontSize.

setFontSize

public void setFontSize(float fontSize)
Sets a float number that indicates the size of font. Unit is point. Default is 12.

Parameters:
fontSize - The FontSize to set.

getBackGroundColor

public Color getBackGroundColor()
Gets the background color of the text paragraph.


setBackGroundColor

public void setBackGroundColor(Color groundColor)
Sets the background color of the text paragraph.


getTextColor

public Color getTextColor()
Gets a Color object that indicates the color of the text.


setTextColor

public void setTextColor(Color color)
Sets a Color object that indicates the color of the text.


isBold

public boolean isBold()
Gets a bool value that indicates whether the TrueType font is bold.


setBold

public void setBold(boolean bold)
Sets a bool value that indicates whether the TrueType font is bold.

Parameters:
bold - boolean, true to set text bold and false not

isItalic

public boolean isItalic()
Gets a bool value that indicates whether the TrueType font is italic.


setItalic

public void setItalic(boolean italic)
Sets a bool value that indicates whether the TrueType font is italic.

Parameters:
italic - boolean, true to set text italic and false not

isOverLine

public boolean isOverLine()
Gets a bool value that indicates whether the text is with overline.


setOverLine

public void setOverLine(boolean overLine)
Sets a bool value that indicates whether the text is with overline. Limitations: you can only use one of overline, underline, strikeout.


isStrikeOut

public boolean isStrikeOut()
Gets a bool value that indicates whether the text is with strikeout.


setStrikeOut

public void setStrikeOut(boolean strikeOut)
Sets a bool value that indicates whether the text is with strikeout. Limitations: you can only use one of overline, underline, strikeout.


isUnderLine

public boolean isUnderLine()
Gets a bool value that indicates whether the text is with underline. Limitations: you can only use one of overline, underline, strikeout.


setUnderLine

public void setUnderLine(boolean underLine)
Sets a bool value that indicates whether the text is with underline.


getLineSpacing

public float getLineSpacing()
Gets float value that indicates the spacing between two text lines.
The unit is point.


setLineSpacing

public void setLineSpacing(float spacing)
Sets a float value that indicates the spacing between two text lines.
The unit is point.


getCharSpacing

public float getCharSpacing()
Gets a float value that indicates space between charcters.The unit is point.


setCharSpacing

public void setCharSpacing(float spacing)
Sets a float value that indicates space between charcters.The unit is point.


equals

public boolean equals(java.lang.Object arg0)
See Also:
Object.equals(java.lang.Object)