![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.pdf.kit.FormattedText
Represents text with color, size, font settings.
Constructor Summary | |
FormattedText(java.lang.String text)
Initializes the Formattedtext with default setting (Color = new Color(0,0,0), FontStyle.TimesRoman£¬EncodingType.Winansi,texSize = 12). |
|
FormattedText(java.lang.String text,
java.awt.Color color,
java.lang.String textFont,
java.lang.String textEncoding,
boolean embedded,
float textSize)
Initializes the Formattedtext. |
|
FormattedText(java.lang.String text,
FontColor textColor,
java.lang.String textFont,
java.lang.String textEncoding,
boolean embedded,
float textSize)
Initializes the Formattedtext. |
Method Summary | |
void |
addNewLineText(java.lang.String newLineText)
Adds a new line to the FormattedText object and sets the newLineText to the next line's text. |
float |
getTextHeight()
Gets the height of the string which the FormattedText object contains. |
float |
getTextWidth()
Gets the width of the string which the FormattedText object contains. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FormattedText(java.lang.String text) throws java.io.IOException, PdfKitException
text
- String The content in string.
java.io.IOException
PdfKitException
public FormattedText(java.lang.String text, FontColor textColor, java.lang.String textFont, java.lang.String textEncoding, boolean embedded, float textSize) throws java.io.IOException, PdfKitException
text
- String The content in String.textColor
- FontColor The color of the text showed.textFont
- String The font of the text showed.textEncoding
- String The font of the text showed.embedded
- boolean If the font has to be embedded.textSize
- float The size of the text.
java.io.IOException
PdfKitException
public FormattedText(java.lang.String text, java.awt.Color color, java.lang.String textFont, java.lang.String textEncoding, boolean embedded, float textSize) throws java.io.IOException, PdfKitException
text
- String The content in String.color
- Color The color of the text showed.textFont
- String The font of the text showed.textEncoding
- String The font of the text showed.embedded
- boolean If the font has to be embedded.textSize
- float The size of the text.
java.io.IOException
PdfKitException
Method Detail |
public float getTextWidth()
public float getTextHeight()
public void addNewLineText(java.lang.String newLineText)
newLineText
- The new line's text.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |