|
DynamicPDF by ceTe Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.cete.dynamicpdf.PageElement
|
+--com.cete.dynamicpdf.pageelements.RotatingPageElement
|
+--com.cete.dynamicpdf.pageelements.HtmlTextArea
This class can be used to place HTML formatted text onto an area of the page.
The HtmlTextArea class accepts the following HTML tags and attributes. Some of the attributes are in addition to the attribute found in HTML and are used for advanced paragraph and line properties. Please note that white space can be treated literally or ignored (standard behavior for HTML).
These tags map directly into the HtmlTextAreaStyle class. This class is used internally to manage the state of the HTML Text Area. The style property of the HTML Text Area represents the initial state of the text.
Enclosed text is bold.
| Attribute | Values | Description |
|---|---|---|
| Color | Web Color Hex String. | Color of the text. |
| Face | A string value. | The font family to use for the text. The 5 built-in font families ("Times" | "Helvetica" | "Courier" | "Symbol" | "ZapfDingbats") can be specified or additional ones can be added through the HtmlTextArea's FontFaces property. |
| Size | An integer value. | Specifies the HTML font size for the text. This is mapped to a point size internally (0 = 6 points, 1 = 8 points, 2 = 10 points, 3 = 12 points, 4 = 14 points, 5 = 18 points, 6 = 24 points, 7 = 36 points). |
| PointSize | A decimal value. | The size in points of the text. |
Enclosed text is italic.
| Attribute | Values | Description |
|---|---|---|
| Leading | A decimal value. | The leading of the line. |
| LeadingType | auto | atLeast | exactly | Specifies how leading is calculated. |
| Attribute | Values | Description |
|---|---|---|
| Align | left | right | center | justify | Alignment of the paragraph's text. |
| AllowOrphanLines | true | false | Specifies if one orphaned line should be allowed to be left on a page, or if it should be grouped with at least one other line for text continuation. |
| Indent | A decimal value. | The first line indentation of the paragraph in points. |
| LeftIndent | A decimal value. | The left indentation of the paragraph in points. |
| PreserveWhiteSpace | true | false | Specifies if white space should be preserved. |
| RightIndent | A decimal value. | The right indentation of the paragraph in points. |
| SpacingAfter | A decimal value. | The spacing after the paragraph in points. |
| SpacingBefore | A decimal value. | The spacing before the paragraph in points. |
Enclosed text is underlined.
View Example
| Constructor Summary | |
HtmlTextArea(char[] text,
float x,
float y,
float width,
float height,
FontFamily fontFamily,
float fontSize,
boolean preserveWhitespace)
Initializes a new instance of the HtmlTextArea class. |
|
HtmlTextArea(char[] text,
float x,
float y,
float width,
float height,
HtmlTextAreaStyle style)
Initializes a new instance of the HtmlTextArea class. |
|
HtmlTextArea(java.lang.String text,
float x,
float y,
float width,
float height,
FontFamily fontFamily,
float fontSize,
boolean preserveWhitespace)
Initializes a new instance of the HtmlTextArea class. |
|
HtmlTextArea(java.lang.String text,
float x,
float y,
float width,
float height,
HtmlTextAreaStyle style)
Initializes a new instance of the HtmlTextArea class. |
|
| Method Summary | |
protected void |
drawRotated(PageWriter writer)
Draws the text area to the given PageWriter object. |
FontFamilyList |
getFontFaces()
Gets the List of FontFamily used by the HTML text area. |
float |
getHeight()
Gets the height of the HTML text area. |
HtmlTextArea |
getOverflowHtmlTextArea()
Returns a new HtmlTextArea object containing the overflow text. |
HtmlTextArea |
getOverflowHtmlTextArea(float x,
float y)
Returns a new HtmlTextArea object containing the overflow text. |
HtmlTextArea |
getOverflowHtmlTextArea(float x,
float y,
float height)
Returns a new HtmlTextArea object containing the overflow text. |
float |
getRequiredHeight()
Returns the required height to fit all of the text of the HtmlTextArea. |
HtmlTextAreaStyle |
getStyle()
Gets HtmlTextAreaStyle object used to specify the initial
style of the HTML text area. |
java.lang.String |
getText()
Gets the text for the HTML text area. |
float |
getWidth()
Gets the width of the HTML text area. |
boolean |
hasOverflowText()
Returns a value specifying if there is text that did not fit in the HtmlTextArea. |
void |
setHeight(float value)
Sets the height of the HTML text area. |
void |
setStyle(HtmlTextAreaStyle value)
Sets HtmlTextAreaStyle object used to specify the initial
style of the HTML text area. |
void |
setText(java.lang.String value)
Sets the text for the HTML text area. |
void |
setWidth(float value)
sets the width of the HTML text area. |
| Methods inherited from class com.cete.dynamicpdf.pageelements.RotatingPageElement |
draw, getAngle, getX, getY, setAngle, setX, setY |
| Methods inherited from class com.cete.dynamicpdf.PageElement |
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.cete.dynamicpdf.pageelements.ICoordinate |
getX, getY, setX, setY |
| Constructor Detail |
public HtmlTextArea(java.lang.String text,
float x,
float y,
float width,
float height,
FontFamily fontFamily,
float fontSize,
boolean preserveWhitespace)
HtmlTextArea class.
text - Text to display in the HTML text area.x - X coordinate of the HTML text area.y - Y coordinate of the HTML text area.width - Width of the HTML text area.height - Height of the HTML text area.fontFamily - Initial FontFamily of the HTML text area.fontSize - Initial font size of the HTML text area.preserveWhitespace - Specifies if white space should be preserved.FontFamily
public HtmlTextArea(java.lang.String text,
float x,
float y,
float width,
float height,
HtmlTextAreaStyle style)
HtmlTextArea class.
text - Text to display in the HTML text area.x - X coordinate of the HTML text area.y - Y coordinate of the HTML text area.width - Width of the HTML text area.height - Height of the HTML text area.style - Initial HtmlTextAreaStyle of the HTML text area.HtmlTextAreaStyle
public HtmlTextArea(char[] text,
float x,
float y,
float width,
float height,
FontFamily fontFamily,
float fontSize,
boolean preserveWhitespace)
HtmlTextArea class.
text - Text to display in the HTML text area.x - X coordinate of the HTML text area.y - Y coordinate of the HTML text area.width - Width of the HTML text area.height - Height of the HTML text area.fontFamily - Initial FontFamily of the HTML text area.fontSize - Initial font size of the HTML text area.preserveWhitespace - Specifies if white space should be preserved.FontFamily
public HtmlTextArea(char[] text,
float x,
float y,
float width,
float height,
HtmlTextAreaStyle style)
HtmlTextArea class.
text - Text to display in the HTML text area.x - X coordinate of the HTML text area.y - Y coordinate of the HTML text area.width - Width of the HTML text area.height - Height of the HTML text area.style - Initial HtmlTextAreaStyle of the HTML text area.HtmlTextAreaStyle| Method Detail |
public FontFamilyList getFontFaces()
FontFamily used by the HTML text area.
FontFamily used by the HTML text area.FontFamilyListpublic float getWidth()
getWidth in interface IAreapublic void setWidth(float value)
setWidth in interface IAreaGeneratorException - If width is changed on an overflow HtmlTextAreavalue - The width of the HTML text area.public float getHeight()
getHeight in interface IAreagetHeight in class RotatingPageElementpublic void setHeight(float value)
setHeight in interface IAreasetHeight in class RotatingPageElementvalue - Height of the HTML text area.public java.lang.String getText()
GeneratorException - If Text is read on an overflow HtmlTextArea.
public void setText(java.lang.String value)
GeneratorException - If Text is changed on an overflow HtmlTextArea.value - Text for the HTML text area.public HtmlTextAreaStyle getStyle()
HtmlTextAreaStyle object used to specify the initial
style of the HTML text area.
HtmlTextAreaStyle Object used to specify the initial
style of the HTML text area.HtmlTextAreaStylepublic void setStyle(HtmlTextAreaStyle value)
HtmlTextAreaStyle object used to specify the initial
style of the HTML text area.
GeneratorException - If Style is changed on an overflow HtmlTextArea.value - HtmlTextAreaStyle Object used to specify the
initial style of the HTML text area.HtmlTextAreaStyleprotected void drawRotated(PageWriter writer)
PageWriter object.
drawRotated in class RotatingPageElementwriter - PageWriter object to receive the HTML text area's output.PageWriterpublic HtmlTextArea getOverflowHtmlTextArea()
HtmlTextArea object containing the overflow text. View Example
HtmlTextArea reference if there is overflow text. Otherwise null.
public HtmlTextArea getOverflowHtmlTextArea(float x,
float y)
HtmlTextArea object containing the overflow text. View Example
x - X coordinate of the new object.y - Y coordinate of the new object.
HtmlTextArea if there is overflow text. Otherwise null.
public HtmlTextArea getOverflowHtmlTextArea(float x,
float y,
float height)
HtmlTextArea object containing the overflow text. View Example
x - X coordinate of the new object.y - Y coordinate of the new object.height - Height of the new object.
HtmlTextArea if there is overflow text. Otherwise null.public float getRequiredHeight()
HtmlTextArea.
HtmlTextAreapublic boolean hasOverflowText()
HtmlTextArea.
HtmlTextArea
|
DynamicPDF by ceTe Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||