Package com.itextpdf.forms.form.element
Class TextArea
- java.lang.Object
-
- com.itextpdf.commons.actions.sequence.AbstractIdentifiableElement
-
- com.itextpdf.layout.ElementPropertyContainer<T>
-
- com.itextpdf.layout.element.AbstractElement<T>
-
- com.itextpdf.forms.form.element.FormField<TextArea>
-
- com.itextpdf.forms.form.element.TextArea
-
- All Implemented Interfaces:
IFormField
,IPlaceholderable
,IAbstractElement
,IBlockElement
,IElement
,IPropertyContainer
,IAccessibleElement
public class TextArea extends FormField<TextArea> implements IPlaceholderable
Extension of theFormField
class representing a button so that aTextAreaRenderer
is used instead of the default renderer for fields.
-
-
Field Summary
Fields Modifier and Type Field Description private Paragraph
placeholder
The placeholder paragraph.private static float
X_OFFSET
Default padding X offset.-
Fields inherited from class com.itextpdf.forms.form.element.FormField
tagProperties
-
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
-
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessibilityProperties
getAccessibilityProperties()
Gets theaccessibility properties
.<T1> T1
getDefaultProperty(int property)
Gets the default property from this entity.Paragraph
getPlaceholder()
Gets the placeholder paragraph.protected IRenderer
makeNewRenderer()
Creates a new renderer instance.void
setPlaceholder(Paragraph placeholder)
Sets the placeholder paragraph.private void
setProperties()
-
Methods inherited from class com.itextpdf.forms.form.element.FormField
getId, setAlternativeDescription, setHeight, setInteractive, setSize, setValue, setWidth
-
Methods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
-
Methods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalic
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.itextpdf.layout.element.IAbstractElement
getChildren
-
Methods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRenderer
-
Methods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
-
-
-
Field Detail
-
X_OFFSET
private static final float X_OFFSET
Default padding X offset.- See Also:
- Constant Field Values
-
placeholder
private Paragraph placeholder
The placeholder paragraph.
-
-
Constructor Detail
-
TextArea
public TextArea(java.lang.String id)
Creates a newTextArea
instance.- Parameters:
id
- the id
-
-
Method Detail
-
getDefaultProperty
public <T1> T1 getDefaultProperty(int property)
Description copied from class:FormField
Gets the default property from this entity.- Specified by:
getDefaultProperty
in interfaceIPropertyContainer
- Overrides:
getDefaultProperty
in classFormField<TextArea>
- Type Parameters:
T1
- the return type associated with the property- Parameters:
property
- the property to be retrieved- Returns:
- the default property value. If the default property is not defined,
null
will be returned
-
getPlaceholder
public Paragraph getPlaceholder()
Gets the placeholder paragraph.- Specified by:
getPlaceholder
in interfaceIPlaceholderable
- Returns:
- the placeholder paragraph
-
setPlaceholder
public void setPlaceholder(Paragraph placeholder)
Sets the placeholder paragraph.- Specified by:
setPlaceholder
in interfaceIPlaceholderable
- Parameters:
placeholder
- the paragraph to be used as placeholder
-
getAccessibilityProperties
public AccessibilityProperties getAccessibilityProperties()
Gets theaccessibility properties
. See alsoIAccessibleElement
.- Specified by:
getAccessibilityProperties
in interfaceIAccessibleElement
- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
protected IRenderer makeNewRenderer()
Description copied from class:AbstractElement
Creates a new renderer instance.- Specified by:
makeNewRenderer
in classAbstractElement<TextArea>
- Returns:
- new
IRenderer
-
setProperties
private void setProperties()
-
-