Package com.itextpdf.forms.form.element
Class InputField
- All Implemented Interfaces:
-
IFormField
,IPlaceholderable
,IAbstractElement
,IBlockElement
,IElement
,IPropertyContainer
Extension of the
FormField
class representing a button so that a InputFieldRenderer
is used.
-
Field Summary
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionT1 getDefaultProperty
(int property) Gets the default property from this entity.Gets the placeholder paragraph.int
Get rotation.protected IRenderer
Creates new renderer instance.void
setPlaceholder
(Paragraph placeholder) Sets the placeholder paragraph.setRotation
(int rotation) Set rotation of the input field.useAsPassword
(boolean isPassword) Determines, whether the input field will be password.Methods inherited from class com.itextpdf.forms.form.element.FormField
getId, 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, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing
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
-
Constructor Details
-
InputField
Creates a new input field.- Parameters:
-
id
- the id
-
-
Method Details
-
useAsPassword
Determines, whether the input field will be password.Usually means that instead of glyphs '*' will be shown in case of flatten field.
If the field is not flatten, value will be ignored.
- Parameters:
-
isPassword
-true
is this field shall be considered as password,false
otherwise - Returns:
- this input field
-
getPlaceholder
Gets the placeholder paragraph.- Specified by:
-
getPlaceholder
in interfaceIPlaceholderable
- Returns:
- the placeholder paragraph
-
setPlaceholder
Sets the placeholder paragraph.- Specified by:
-
setPlaceholder
in interfaceIPlaceholderable
- Parameters:
-
placeholder
- the paragraph to be used as placeholder
-
getDefaultProperty
publicT1 getDefaultProperty (int property) Description copied from class:FormField
Gets the default property from this entity.- Specified by:
-
getDefaultProperty
in interfaceIPropertyContainer
- Overrides:
-
getDefaultProperty
in classFormField<InputField>
- 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
-
setRotation
Set rotation of the input field.- Parameters:
-
rotation
- new rotation value, counterclockwise. Must be a multiple of 90 degrees. It has sense only in interactive mode, seeFormField.setInteractive(boolean)
. - Returns:
-
the edited
InputField
.
-
getRotation
public int getRotation()Get rotation.- Returns:
- rotation value.
-
makeNewRenderer
Description copied from class:AbstractElement
Creates new renderer instance.- Specified by:
-
makeNewRenderer
in classAbstractElement<InputField>
- Returns:
-
new
IRenderer
-