|
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.TaggablePageElement com.cete.dynamicpdf.pageelements.RotatingPageElement com.cete.dynamicpdf.pageelements.FormattedTextArea
public class FormattedTextArea
This class can be used to place Formatted formatted text onto an area of the page.
The FormattedTextArea class accepts the following Formatted tags and attributes. Some of the attributes are in addition to the attribute found in Formatted and are used for advanced paragraph and line properties. Please note that white space can be treated literally or ignored (standard behavior for Formatted).
These tags map directly into the FormattedTextAreaStyle class. This class is used internally to manage the state of the Formatted Text Area. The style property of the Formatted 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 FormattedTextArea's FontFaces property. |
Size | An integer value. | Specifies the Formatted 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.
Licensing:
This class is a DynamicPDF Generator Professional Edition
feature. One of the following licenses is required for non-evaluation usage:
Nested Class Summary | |
---|---|
protected class |
FormattedTextArea.Line
|
protected class |
FormattedTextArea.LineList
|
Constructor Summary | |
---|---|
FormattedTextArea(char[] text,
float x,
float y,
float width,
float height,
FontFamily fontFamily,
float fontSize,
boolean preserveWhitespace)
Initializes a new instance of the FormattedTextArea class. |
|
FormattedTextArea(char[] text,
float x,
float y,
float width,
float height,
FormattedTextAreaStyle style)
Initializes a new instance of the FormattedTextArea class. |
|
FormattedTextArea(java.lang.String text,
float x,
float y,
float width,
float height,
FontFamily fontFamily,
float fontSize,
boolean preserveWhitespace)
Initializes a new instance of the FormattedTextArea class. |
|
FormattedTextArea(java.lang.String text,
float x,
float y,
float width,
float height,
FormattedTextAreaStyle style)
Initializes a new instance of the FormattedTextArea 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 Formatted text area. |
float |
getHeight()
Gets the height of the Formatted text area. |
FormattedTextArea |
getOverflowFormattedTextArea()
Returns a new FormattedTextArea object containing the overflow text. |
FormattedTextArea |
getOverflowFormattedTextArea(float x,
float y)
Returns a new FormattedTextArea object containing the overflow text. |
FormattedTextArea |
getOverflowFormattedTextArea(float x,
float y,
float height)
Returns a new FormattedTextArea object containing the overflow text. |
float |
getRequiredHeight()
Returns the required height to fit all of the text of the FormattedTextArea . |
FormattedTextAreaStyle |
getStyle()
Gets FormattedTextAreaStyle object used to specify the initial
style of the Formatted text area. |
java.lang.String |
getText()
Gets the text for the Formatted text area. |
VAlign |
getVAlign()
Gets a value indicating the vertical alignment of the formatted text area. |
float |
getWidth()
Gets the width of the Formatted text area. |
boolean |
hasOverflowText()
Returns a value specifying if there is text that did not fit in the FormattedTextArea . |
void |
setHeight(float value)
Sets the height of the Formatted text area. |
void |
setStyle(FormattedTextAreaStyle value)
Sets FormattedTextAreaStyle object used to specify the initial
style of the Formatted text area. |
void |
setText(java.lang.String value)
Sets the text for the Formatted text area. |
void |
setVAlign(VAlign vAlign)
Sets a value indicating the vertical alignment of the formatted text area. |
void |
setWidth(float value)
sets the width of the Formatted 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.pageelements.TaggablePageElement |
---|
getTag, getTagOrder, setTag, setTagOrder |
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 FormattedTextArea(java.lang.String text, float x, float y, float width, float height, FontFamily fontFamily, float fontSize, boolean preserveWhitespace)
FormattedTextArea
class.
text
- Text to display in the Formatted text area.x
- X coordinate of the Formatted text area.y
- Y coordinate of the Formatted text area.width
- Width of the Formatted text area.height
- Height of the Formatted text area.fontFamily
- Initial FontFamily
of the Formatted text area.fontSize
- Initial font size of the Formatted text area.preserveWhitespace
- Specifies if white space should be preserved.FontFamily
public FormattedTextArea(java.lang.String text, float x, float y, float width, float height, FormattedTextAreaStyle style)
FormattedTextArea
class.
text
- Text to display in the Formatted text area.x
- X coordinate of the Formatted text area.y
- Y coordinate of the Formatted text area.width
- Width of the Formatted text area.height
- Height of the Formatted text area.style
- Initial FormattedTextAreaStyle
of the Formatted text area.FormattedTextAreaStyle
public FormattedTextArea(char[] text, float x, float y, float width, float height, FontFamily fontFamily, float fontSize, boolean preserveWhitespace)
FormattedTextArea
class.
text
- Text to display in the Formatted text area.x
- X coordinate of the Formatted text area.y
- Y coordinate of the Formatted text area.width
- Width of the Formatted text area.height
- Height of the Formatted text area.fontFamily
- Initial FontFamily
of the Formatted text area.fontSize
- Initial font size of the Formatted text area.preserveWhitespace
- Specifies if white space should be preserved.FontFamily
public FormattedTextArea(char[] text, float x, float y, float width, float height, FormattedTextAreaStyle style)
FormattedTextArea
class.
text
- Text to display in the Formatted text area.x
- X coordinate of the Formatted text area.y
- Y coordinate of the Formatted text area.width
- Width of the Formatted text area.height
- Height of the Formatted text area.style
- Initial FormattedTextAreaStyle
of the Formatted text area.FormattedTextAreaStyle
Method Detail |
---|
public FontFamilyList getFontFaces()
FontFamily
used by the Formatted text area.
FontFamily
used by the Formatted text area.FontFamilyList
public float getWidth()
getWidth
in interface IArea
public void setWidth(float value)
setWidth
in interface IArea
GeneratorException
- If width is changed on an overflow FormattedTextAreavalue
- The width of the Formatted text area.public float getHeight()
getHeight
in interface IArea
getHeight
in class RotatingPageElement
public void setHeight(float value)
setHeight
in interface IArea
setHeight
in class RotatingPageElement
value
- Height of the Formatted text area.public VAlign getVAlign()
public void setVAlign(VAlign vAlign)
vAlign
- Vertical alignment of the Formatted text area.public java.lang.String getText()
GeneratorException
- If Text is read on an overflow FormattedTextArea.
public void setText(java.lang.String value)
GeneratorException
- If Text is changed on an overflow FormattedTextArea.value
- Text for the Formatted text area.public FormattedTextAreaStyle getStyle()
FormattedTextAreaStyle
object used to specify the initial
style of the Formatted text area.
FormattedTextAreaStyle
Object used to specify the initial
style of the Formatted text area.FormattedTextAreaStyle
public void setStyle(FormattedTextAreaStyle value)
FormattedTextAreaStyle
object used to specify the initial
style of the Formatted text area.
GeneratorException
- If Style is changed on an overflow FormattedTextArea.value
- FormattedTextAreaStyle
Object used to specify the
initial style of the Formatted text area.FormattedTextAreaStyle
protected void drawRotated(PageWriter writer)
PageWriter
object.
drawRotated
in class RotatingPageElement
writer
- PageWriter
object to receive the Formatted text area's output.PageWriter
public FormattedTextArea getOverflowFormattedTextArea()
FormattedTextArea
object containing the overflow text. View Example
FormattedTextArea
reference if there is overflow text. Otherwise null.public FormattedTextArea getOverflowFormattedTextArea(float x, float y)
FormattedTextArea
object containing the overflow text. View Example
x
- X coordinate of the new object.y
- Y coordinate of the new object.
FormattedTextArea
if there is overflow text. Otherwise null.public FormattedTextArea getOverflowFormattedTextArea(float x, float y, float height)
FormattedTextArea
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.
FormattedTextArea
if there is overflow text. Otherwise null.public float getRequiredHeight()
FormattedTextArea
.
FormattedTextArea
public boolean hasOverflowText()
FormattedTextArea
.
FormattedTextArea
|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |