Package com.pdftools.toolbox.pdf.forms
Class GeneralTextField
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.forms.FieldNode
-
- com.pdftools.toolbox.pdf.forms.Field
-
- com.pdftools.toolbox.pdf.forms.TextField
-
- com.pdftools.toolbox.pdf.forms.GeneralTextField
-
public class GeneralTextField extends TextField
A general text field
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeneralTextFieldcreate(Document targetDocument)Create a general text form fieldbooleangetDoNotScroll()Flags this text field non scrollable (Getter)booleangetDoNotSpellCheck()Flags this text field for prevention from spell checking (Getter)java.lang.IntegergetMaxLength()The maximal text length (Getter)booleangetMultiline()Flags this text field as multi-line (Getter)booleangetPassword()Flags this text field as a password entry field (Getter)voidsetDoNotScroll(boolean value)Flags this text field non scrollable (Setter)voidsetDoNotSpellCheck(boolean value)Flags this text field for prevention from spell checking (Setter)voidsetMaxLength(java.lang.Integer value)The maximal text length (Setter)voidsetMultiline(boolean value)Flags this text field as multi-line (Setter)voidsetPassword(boolean value)Flags this text field as a password entry field (Setter)-
Methods inherited from class com.pdftools.toolbox.pdf.forms.TextField
getAlignment, getFontSize, getText, setAlignment, setFontSize, setText
-
Methods inherited from class com.pdftools.toolbox.pdf.forms.Field
addNewWidget, getDoNotExport, getReadOnly, getRequired, getWidgets, setDoNotExport, setReadOnly, setRequired
-
Methods inherited from class com.pdftools.toolbox.pdf.forms.FieldNode
copy, getDisplayName, getExportName, setDisplayName, setExportName
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static GeneralTextField create(Document targetDocument)
Create a general text form field
The returned form field object is not yet used, but it is associated with the given target document.- Parameters:
targetDocument- the output document with which the returned object is associated- Returns:
- the newly created general text field
- Throws:
java.lang.IllegalArgumentException- if thetargetDocumentargument has already been closedjava.lang.IllegalArgumentException- if thetargetDocumentargument is read-onlyjava.lang.IllegalArgumentException- the target document contains form fields that have been implicitly copied by a call totoolbox.pdf.Page.copywith an argumentoptionsin whichtoolbox.pdf.PageCopyOptions.setFormFieldswas set toFormFieldCopyStrategy.COPYjava.lang.IllegalArgumentException- the target document contains unsigned signatures that have been implicitly copied by a call totoolbox.pdf.Page.copywith an argumentoptionsin whichtoolbox.pdf.PageCopyOptions.setUnsignedSignatureswas set totoolbox.pdf.CopyStrategy.COPY.java.lang.IllegalArgumentException- iftargetDocumentisnull
-
getMaxLength
public java.lang.Integer getMaxLength()
The maximal text length (Getter)
When setting this property to a non-null value, the length of this field's text is truncated.- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
setMaxLength
public void setMaxLength(java.lang.Integer value)
The maximal text length (Setter)
When setting this property to a non-null value, the length of this field's text is truncated.- Throws:
java.lang.IllegalStateException- if the object has already been closedjava.lang.UnsupportedOperationException- if the document is read-onlyjava.lang.IllegalStateException- if the form field has widgetsjava.lang.IllegalArgumentException- if the given value is notnulland is smaller than 0
-
getMultiline
public boolean getMultiline()
Flags this text field as multi-line (Getter)
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
setMultiline
public void setMultiline(boolean value)
Flags this text field as multi-line (Setter)
- Throws:
java.lang.IllegalStateException- if the object has already been closedjava.lang.UnsupportedOperationException- if the document is read-onlyjava.lang.IllegalStateException- if the form field has widgets
-
getPassword
public boolean getPassword()
Flags this text field as a password entry field (Getter)
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
setPassword
public void setPassword(boolean value)
Flags this text field as a password entry field (Setter)
- Throws:
java.lang.IllegalStateException- if the object has already been closedjava.lang.UnsupportedOperationException- if the document is read-onlyjava.lang.IllegalStateException- if the form field has widgets
-
getDoNotSpellCheck
public boolean getDoNotSpellCheck()
Flags this text field for prevention from spell checking (Getter)
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
setDoNotSpellCheck
public void setDoNotSpellCheck(boolean value)
Flags this text field for prevention from spell checking (Setter)
- Throws:
java.lang.IllegalStateException- if the object has already been closedjava.lang.UnsupportedOperationException- if the document is read-only
-
getDoNotScroll
public boolean getDoNotScroll()
Flags this text field non scrollable (Getter)
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
setDoNotScroll
public void setDoNotScroll(boolean value)
Flags this text field non scrollable (Setter)
- Throws:
java.lang.IllegalStateException- if the object has already been closedjava.lang.UnsupportedOperationException- if the document is read-only
-
-