|
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.TextArea
public class TextArea
This class can be used to place text on a page. Using the methods GetOverflowText or GetOverflowTextArea and HasOverflowText, users can control the pagination of TextAreas that come from a source of unknown length.
Licensing:
This class is a DynamicPDF Generator Professional Edition
feature. One of the following licenses is required for non-evaluation usage:
Constructor Summary | |
---|---|
TextArea(char[] text,
float x,
float y,
float width,
float height,
Font font,
float fontSize,
TextAlign align)
Initializes a new instance of the TextArea class. |
|
TextArea(char[] text,
float x,
float y,
float width,
float height,
Font font,
float fontSize,
TextAlign align,
Color textColor)
Initializes a new instance of the TextArea class. |
|
TextArea(java.lang.String text,
float x,
float y,
float width,
float height)
Initializes a new instance of the TextArea class. |
|
TextArea(java.lang.String text,
float x,
float y,
float width,
float height,
Font font)
Initializes a new instance of the TextArea class. |
|
TextArea(java.lang.String text,
float x,
float y,
float width,
float height,
Font font,
float fontSize)
Initializes a new instance of the TextArea class. |
|
TextArea(java.lang.String text,
float x,
float y,
float width,
float height,
Font font,
float fontSize,
Color textColor)
Initializes a new instance of the TextArea class. |
|
TextArea(java.lang.String text,
float x,
float y,
float width,
float height,
Font font,
float fontSize,
TextAlign align)
Initializes a new instance of the TextArea class. |
|
TextArea(java.lang.String text,
float x,
float y,
float width,
float height,
Font font,
float fontSize,
TextAlign align,
Color textColor)
Initializes a new instance of the TextArea class. |
Method Summary | |
---|---|
protected void |
drawRotated(PageWriter writer)
Draws the text area to the given PageWriter object. |
TextAlign |
getAlign()
Gets the TextAlign enumeration that specifies the
text alignment of the text area. |
boolean |
getAutoLeading()
Gets the leading of the text area, calculated automatically. |
boolean |
getCleanParagraphBreaks()
Gets the clean paragraph breaks for the paragraphs of the text area. |
Font |
getFont()
Gets the Font object used to specify the font of the text
for the text area. |
float |
getFontSize()
Gets the font size for the text of the text area. |
float |
getHeight()
Gets the height of the label. |
boolean |
getKerningEnabled()
Gets the kerning property of the text. |
KerningValues |
getKerningValues()
Get the Kerning values. |
float |
getLeading()
Gets the leading for the text of the text area. |
float |
getLineTextWidth(int lineIndex)
|
java.lang.String |
getOverflowText()
Returns the text remaining that will be clipped by the text area. |
TextArea |
getOverflowTextArea()
Returns a TextArea object containing the overflow text. |
TextArea |
getOverflowTextArea(float x,
float y)
Returns a TextArea object containing the overflow text. |
TextArea |
getOverflowTextArea(float x,
float y,
float width,
float height)
Returns a TextArea object containing the overflow text. |
float |
getParagraphIndent()
Gets the paragraph indenting for the paragraphs of the text area. |
float |
getParagraphSpacing()
Gets the paragraph spacing for the paragraphs of the text area. |
float |
getRequiredHeight()
Returns the height required to fit all of the text supplied. |
boolean |
getRightToLeft()
Gets a value indicating if text should be displayed right to left. |
boolean |
getStrikethrough()
Gets the strikeThrough for the text outline of the label.. |
java.lang.String |
getText()
Gets the text of the text area. |
Color |
getTextColor()
Gets the Color object to use for the text of the text area. |
float |
getTextHeight()
Returns the height of the text that will be drawn. |
Color |
getTextOutlineColor()
Gets the Color object to use for the text outline of the text area. |
float |
getTextOutlineWidth()
Gets the line width to use for the text outline of the label.. |
boolean |
getUnderline()
Gets a value indicating if the text area is underlined. |
VAlign |
getVAlign()
Gets VAlign enumeration that specifies the vertical text
alignment of the text area. |
int |
getVisibleLineCount()
|
float |
getWidth()
Gets the width of the text area. |
boolean |
hasOverflowText()
Returns a value indicating if there is text remaining that will not be drawn to the text area. |
void |
setAlign(TextAlign align)
Sets the TextAlign enumeration that specifies the
text alignment of the text area. |
void |
setAutoLeading(boolean value)
Sets whether the leading of the text area should be calculated automatically. |
void |
setCleanParagraphBreaks(boolean cleanParagraphBreaks)
Sets the clean paragraph breaks for the paragraphs of the text area. |
void |
setFont(Font font)
Sets the Font object used to specify the font of the text
for the text area. |
void |
setFontSize(float fontSize)
Sets the font size for the text of the text area. |
void |
setHeight(float height)
Sets the height of the label. |
void |
setKerningEnabled(boolean value)
Sets the kerning property of the text. |
void |
setLeading(float leading)
Sets the leading for the text of the text area. |
void |
setParagraphIndent(float paragraphIndent)
Sets the paragraph indenting for the paragraphs of the text area. |
void |
setParagraphSpacing(float paragraphSpacing)
Sets the paragraph spacing for the paragraphs of the text area. |
void |
setRightToLeft(boolean rightToLeft)
Sets a value indicating if text should be displayed right to left. |
void |
setStrikethrough(boolean value)
Sets the strikeThrough for the text outline of the label.. |
void |
setText(java.lang.String text)
Sets the text of the text area. |
void |
setTextColor(Color textColor)
Sets the Color object to use for the text of the text area. |
void |
setTextOutlineColor(Color textOutlineColor)
Sets the Color object to use for the text outline of the text area. |
void |
setTextOutlineWidth(float value)
Sets the line width to use for the text outline of the label.. |
void |
setUnderline(boolean underline)
Sets a value indicating if the text area is underlined. |
void |
setVAlign(VAlign vAlign)
Sets the VAlign enumeration that specifies the vertical text
alignment of the text area. |
void |
setWidth(float width)
Sets the width of the 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 TextArea(java.lang.String text, float x, float y, float width, float height)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.public TextArea(java.lang.String text, float x, float y, float width, float height, Font font)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.font
- Font
for the text of the text area.Font
public TextArea(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.font
- Font
for the text of the text area.fontSize
- Font size of the text of the text area.Font
public TextArea(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize, TextAlign align)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.font
- Font
for the text of the text area.fontSize
- Font size of the text of the text area.align
- Alignment of the text of the text area.Font
,
Align
public TextArea(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize, Color textColor)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.font
- Font
for the text of the text area.fontSize
- Font size of the text of the text area.textColor
- Color
of the text of the text area.Font
,
Color
public TextArea(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize, TextAlign align, Color textColor)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.font
- Font
for the text of the text area.fontSize
- Font size of the text of the text area.align
- Alignment of the text of the text area.textColor
- Color
of the text of the text area.Font
,
TextAlign
,
Color
public TextArea(char[] text, float x, float y, float width, float height, Font font, float fontSize, TextAlign align)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.font
- Font
for the text of the text area.fontSize
- Font size of the text of the text area.align
- Alignment of the text of the text area.Font
,
Align
public TextArea(char[] text, float x, float y, float width, float height, Font font, float fontSize, TextAlign align, Color textColor)
TextArea
class.
text
- Text to display in the text area.x
- X coordinate of the text area.y
- Y coordinate of the text area.width
- Width of the text area.height
- Height of the text area.font
- Font
for the text of the text area.fontSize
- Font size of the text of the text area.align
- Alignment of the text of the text area.textColor
- Color
of the text of the text area.Font
,
TextAlign
,
Color
Method Detail |
---|
public void setAlign(TextAlign align)
TextAlign
enumeration that specifies the
text alignment of the text area.
align
- TextAlign
enumeration that specifies
the text alignment of the text area.TextAlign
public TextAlign getAlign()
TextAlign
enumeration that specifies the
text alignment of the text area.
TextAlign
enumeration that specifies the
text alignment of the text area.TextAlign
public void setVAlign(VAlign vAlign)
VAlign
enumeration that specifies the vertical text
alignment of the text area.
vAlign
- VAlign
enumeration that specifies the vertical
text alignment of the text area.VAlign
public VAlign getVAlign()
VAlign
enumeration that specifies the vertical text
alignment of the text area.
VAlign
enumeration that specifies the vertical text
alignment of the text area.VAlign
public void setUnderline(boolean underline)
underline
- value indicating if the text area is underlined.public boolean getUnderline()
public void setRightToLeft(boolean rightToLeft)
rightToLeft
- value indicating if text should be displayed
right to left.public boolean getRightToLeft()
public void setText(java.lang.String text)
text
- the text of the text area.public java.lang.String getText()
public void setTextColor(Color textColor)
Color
object to use for the text of the text area.
textColor
- Color
object to use for the text of the
text area.Color
public Color getTextColor()
Color
object to use for the text of the text area.
Color
object to use for the text of the text area.Color
public void setTextOutlineColor(Color textOutlineColor)
Color
object to use for the text outline of the text area.
textOutlineColor
- Color
object to use for the text outline of the text areaColor
public Color getTextOutlineColor()
Color
object to use for the text outline of the text area.
Color
object to use for the text outline of the text area.Color
public float getTextOutlineWidth()
public void setTextOutlineWidth(float value)
value
- the text width of the text outline of the label.public boolean getStrikethrough()
public void setStrikethrough(boolean value)
value
- strikeThrough of the text outline of the label.public void setFont(Font font)
Font
object used to specify the font of the text
for the text area.
font
- Font
object used to specify the font of the
text for the text area.Font
public Font getFont()
Font
object used to specify the font of the text
for the text area.
Font
object used to specify the font of the text
for the text area.Font
public void setFontSize(float fontSize)
fontSize
- font size for the text of the text area.public float getFontSize()
public void setLeading(float leading)
Setting this property will automatically set the
AutoLeading
property to false.
leading
- the leading for the text of the text area.public float getLeading()
public boolean getAutoLeading()
setLeading(float)
public void setAutoLeading(boolean value)
This property is automatically set to false any time the
Leading
property is set.
value
- the auto leading status of the text area.public void setParagraphSpacing(float paragraphSpacing)
paragraphSpacing
- paragraph spacing for the paragraphs of the
text area.public float getParagraphSpacing()
public void setParagraphIndent(float paragraphIndent)
paragraphIndent
- paragraph indenting for the paragraphs of the
text area.public float getParagraphIndent()
public void setCleanParagraphBreaks(boolean cleanParagraphBreaks)
cleanParagraphBreaks
- clean paragraph breaks for the paragraphs
of the text area.public boolean getCleanParagraphBreaks()
public void setWidth(float width)
setWidth
in interface IArea
width
- the width of the text area.public float getWidth()
getWidth
in interface IArea
public void setHeight(float height)
setHeight
in interface IArea
setHeight
in class RotatingPageElement
height
- the height of the label.public float getHeight()
getHeight
in interface IArea
getHeight
in class RotatingPageElement
public boolean getKerningEnabled()
public void setKerningEnabled(boolean value)
value
- boolean value used to set the kerning property of the text.protected void drawRotated(PageWriter writer)
PageWriter
object.
drawRotated
in class RotatingPageElement
writer
- PageWriter
object to receive the
text area's output.PageWriter
public float getRequiredHeight()
public float getTextHeight()
public java.lang.String getOverflowText()
public TextArea getOverflowTextArea()
TextArea
object containing the overflow text. View Example
TextArea
object.public TextArea getOverflowTextArea(float x, float y)
TextArea
object containing the overflow text. View Example
x
- X coordinate of the new text area.y
- Y coordinate of the new text area.
TextArea
object.public TextArea getOverflowTextArea(float x, float y, float width, float height)
TextArea
object containing the overflow text. View Example
x
- X coordinate of the new text area.y
- Y coordinate of the new text area.width
- Width of the new text area.height
- Height of the new text area.
TextArea
object.public boolean hasOverflowText()
public KerningValues getKerningValues()
public int getVisibleLineCount()
public float getLineTextWidth(int lineIndex)
|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |