Class GeneralTextField
- java.lang.Object
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeBase
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.forms.FieldNode
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.forms.Field
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.forms.TextField
-
- com.pdf_tools.fourheights.pdftoolbox.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 GeneralTextField
create(Document targetDocument)
Create a general text form fieldboolean
getDoNotScroll()
Flags this text field non scrollable (Getter)boolean
getDoNotSpellCheck()
Flags this text field for prevention from spell checking (Getter)java.lang.Integer
getMaxLength()
The maximal text length (Getter)boolean
getMultiline()
Flags this text field as multi-line (Getter)boolean
getPassword()
Flags this text field as a password entry field (Getter)void
setDoNotScroll(boolean value)
Flags this text field non scrollable (Setter)void
setDoNotSpellCheck(boolean value)
Flags this text field for prevention from spell checking (Setter)void
setMaxLength(java.lang.Integer value)
The maximal text length (Setter)void
setMultiline(boolean value)
Flags this text field as multi-line (Setter)void
setPassword(boolean value)
Flags this text field as a password entry field (Setter)-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.forms.TextField
getAlignment, getFontSize, getText, setAlignment, setFontSize, setText
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.forms.Field
addNewWidget, getDoNotExport, getReadOnly, getRequired, getWidgets, setDoNotExport, setReadOnly, setRequired
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.forms.FieldNode
copy, getDisplayName, getExportName, setDisplayName, setExportName
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.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 thetargetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- the target document contains form fields that have been implicitly copied by a call topdftoolbox.pdf.Page.copy
with an argumentoptions
in whichpdftoolbox.pdf.PageCopyOptions.setFormFields
was set toFormFieldCopyStrategy.COPY
java.lang.IllegalArgumentException
- the target document contains unsigned signatures that have been implicitly copied by a call topdftoolbox.pdf.Page.copy
with an argumentoptions
in whichpdftoolbox.pdf.PageCopyOptions.setUnsignedSignatures
was set topdftoolbox.pdf.CopyStrategy.COPY
.java.lang.IllegalArgumentException
- iftargetDocument
isnull
-
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 notnull
and 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
-
-