Package com.dynamicpdf.api.elements
Class TextElement
java.lang.Object
com.dynamicpdf.api.elements.Element
com.dynamicpdf.api.elements.TextElement
Represents a text element.
 
 
This class can be used to place text on a page.
- 
Constructor Summary
ConstructorsConstructorDescriptionTextElement(String value, ElementPlacement placement)Initializes a new instance of theTextElementclassTextElement(String value, ElementPlacement placement, float xOffset, float yOffset)Initializes a new instance of theTextElementclass - 
Method Summary
Modifier and TypeMethodDescriptiongetColor()Gets theColorobject to use for the text of the text element.getFont()Gets theFontobject used to specify the font of the text for the text element.floatGets the font size for the text of the text element.getText()Gets the text to display in the text element.voidSets theColorobject to use for the text of the text element.voidSets theFontobject used to specify the font of the text for the text element.voidsetFontSize(float value)Sets the font size for the text of the text element.voidSets the text to display in the text element.Methods inherited from class com.dynamicpdf.api.elements.Element
getEvenPages, getOddPages, getPlacement, getXOffset, getYOffset, setEvenPages, setOddPages, setPlacement, setXOffset, setYOffset 
- 
Constructor Details
- 
TextElement
Initializes a new instance of theTextElementclass- Parameters:
 value- Text to display in the text element.placement- The placement of the text element on the page.xOffset- X coordinate of the text element.yOffset- Y coordinate of the text element.
 - 
TextElement
Initializes a new instance of theTextElementclass- Parameters:
 value- Text to display in the text element.placement- The placement of the text element on the page.
 
 - 
 - 
Method Details
- 
getResource
- Overrides:
 getResourcein classElement
 - 
getTextFont
- Overrides:
 getTextFontin classElement
 - 
getText
Gets the text to display in the text element.- Returns:
 - The text to display in the text element.
 
 - 
setText
Sets the text to display in the text element.- Parameters:
 value- The text to display in the text element.
 - 
getColor
Gets theColorobject to use for the text of the text element.- Returns:
 - The 
Colorobject to use for the text of the text element. 
 - 
setColor
Sets theColorobject to use for the text of the text element.- Parameters:
 value- TheColorobject to use for the text of the text element.
 - 
getFont
Gets theFontobject used to specify the font of the text for the text element.- Returns:
 - The 
Fontobject used to specify the font of the text for the text element. 
 - 
setFont
Sets theFontobject used to specify the font of the text for the text element.- Parameters:
 value- TheFontobject used to specify the font of the text for the text element.
 - 
getFontSize
public float getFontSize()Gets the font size for the text of the text element.- Returns:
 - The font size for the text of the text element.
 
 - 
setFontSize
public void setFontSize(float value)Sets the font size for the text of the text element.- Parameters:
 value- The font size for the text of the text element.
 
 -