Package com.pdftools.toolbox.pdf.forms
Class TextField
- 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
-
- Direct Known Subclasses:
CombTextField
,GeneralTextField
public abstract class TextField extends Field
A text field
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HorizontalAlignment
getAlignment()
The text alignment (Getter)java.lang.Double
getFontSize()
The font size (Getter)java.lang.String
getText()
This field's text (Getter)void
setAlignment(HorizontalAlignment value)
The text alignment (Setter)void
setFontSize(java.lang.Double value)
The font size (Setter)void
setText(java.lang.String value)
This field's text (Setter)-
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
-
getText
public java.lang.String getText()
This field's text (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
setText
public void setText(java.lang.String value)
This field's text (Setter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closedjava.lang.UnsupportedOperationException
- if the document is read-onlyjava.lang.IllegalStateException
- the form field is marked as read-onlyjava.lang.IllegalStateException
- if the form field has widgetsjava.lang.IllegalArgumentException
- the string length of the given value exceeds the text field'sGeneralTextField.getMaxLength()
-
getAlignment
public HorizontalAlignment getAlignment()
The text alignment (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
setAlignment
public void setAlignment(HorizontalAlignment value)
The text alignment (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 widgetsjava.lang.IllegalArgumentException
- ifvalue
isnull
-
getFontSize
public java.lang.Double getFontSize()
The font size (Getter)
Ifnull
then the font size is chosen automatically by the PDF viewer.- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
setFontSize
public void setFontSize(java.lang.Double value)
The font size (Setter)
Ifnull
then the font size is chosen automatically by the PDF viewer.- 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 smaller than 0.0
-
-