public class CombTextField extends TextField
GeneralTextField.getMaxLength()
must be defined.
The glyphs displayed are placed in GeneralTextField.getMaxLength()
equally spaced cells.Modifier and Type | Method and Description |
---|---|
static CombTextField |
create(Document targetDocument,
int maxLength)
Create a comb text form field
|
static CombTextField |
createDynamicObject(long handle) |
int |
getMaxLength()
The maximal text length (Getter)
|
void |
setMaxLength(int value)
The maximal text length (Setter)
|
getAlignment, getFontSize, getText, setAlignment, setFontSize, setText
addNewWidget, getDoNotExport, getReadOnly, getRequired, getWidgets, setDoNotExport, setReadOnly, setRequired
copy, getDisplayName, getExportName, setDisplayName, setExportName
equals, hashCode
public static CombTextField createDynamicObject(long handle)
public static CombTextField create(Document targetDocument, int maxLength)
targetDocument
- the output document with which the returned object is associatedmaxLength
- the maximal character length for this fieldjava.lang.IllegalArgumentException
- if the targetDocument
argument is null
java.lang.IllegalArgumentException
- if the targetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if the targetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- the target document contains form fields that have been implicitly copied by a call to
pdftoolbox.pdf.Page.copy
with an argument options
in which
pdftoolbox.pdf.PageCopyOptions.setFormFields
was set to FormFieldCopyStrategy.COPY
java.lang.IllegalArgumentException
- the target document contains unsigned signatures that have been implicitly copied by a call to
pdftoolbox.pdf.Page.copy
with an argument options
in which
pdftoolbox.pdf.PageCopyOptions.setUnsignedSignatures
was set to pdftoolbox.pdf.CopyStrategy.COPY
.java.lang.IllegalArgumentException
- if maxLength
is smaller than 0public int getMaxLength()
java.lang.IllegalStateException
- if the object has already been closedpublic void setMaxLength(int value)
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 smaller than 0