public static class

TextFormConfiguration.Builder

extends FormElementConfiguration.BaseBuilder<V extends FormElementConfiguration, B extends BaseBuilder<V, B>>
java.lang.Object
   ↳ com.pspdfkit.forms.FormElementConfiguration.BaseBuilder<V extends com.pspdfkit.forms.FormElementConfiguration, B extends com.pspdfkit.forms.FormElementConfiguration.BaseBuilder<V, B>>
     ↳ com.pspdfkit.forms.TextFormConfiguration.Builder

Class Overview

Builder used to construct TextFormConfiguration instance.

Summary

Public Constructors
Builder(int pageIndex, RectF boundingBox)
Creates a new TextFormConfiguration builder.
Public Methods
TextFormConfiguration build()
Creates a TextFormConfiguration with the arguments supplied to this builder.
TextFormConfiguration.Builder setMaxLength(int maxLength)
Sets the maximum length of text allowed in the text field.
TextFormConfiguration.Builder setMultiLine(boolean isMultiLine)
Sets whether text is allowed to have multiple lines or not.
TextFormConfiguration.Builder setPassword(boolean isPassword)
Sets whether text is intended for entering a secure password that should not be visible on the screen.
TextFormConfiguration.Builder setRichText(String richText)
Sets rich text contents.
TextFormConfiguration.Builder setScrollEnabled(boolean isScrollEnabled)
Sets whether the text field can be scrolled (horizontally for single-line fields, vertically for multi-line fields), defaults to true.
TextFormConfiguration.Builder setSpellCheckEnabled(boolean isSpellCheckEnabled)
Sets whether text entered in the field shall be spell-checked, defaults to true.
TextFormConfiguration.Builder setText(String text)
Sets text contents.
Protected Methods
TextFormConfiguration.Builder getThis()
Returns correct type of this builder.
[Expand]
Inherited Methods
From class com.pspdfkit.forms.FormElementConfiguration.BaseBuilder
From class java.lang.Object

Public Constructors

public Builder (int pageIndex, RectF boundingBox)

Creates a new TextFormConfiguration builder.

Parameters
pageIndex Page index where the checkbox form element will be attached.
boundingBox Annotation bounding box of the widget annotation representing the appearance of the checkbox form element.

Public Methods

public TextFormConfiguration build ()

Creates a TextFormConfiguration with the arguments supplied to this builder.

Returns
  • Newly created configuration.

public TextFormConfiguration.Builder setMaxLength (int maxLength)

Sets the maximum length of text allowed in the text field.

Parameters
maxLength Maximum length of text allowed or 0 if length is unlimited.

public TextFormConfiguration.Builder setMultiLine (boolean isMultiLine)

Sets whether text is allowed to have multiple lines or not.

Parameters
isMultiLine true when text is allowed to span multiple lines.

public TextFormConfiguration.Builder setPassword (boolean isPassword)

Sets whether text is intended for entering a secure password that should not be visible on the screen.

Parameters
isPassword true when text should be not echoed on screen.

public TextFormConfiguration.Builder setRichText (String richText)

Sets rich text contents.

Parameters
richText Rich text contents to be set.

public TextFormConfiguration.Builder setScrollEnabled (boolean isScrollEnabled)

Sets whether the text field can be scrolled (horizontally for single-line fields, vertically for multi-line fields), defaults to true. If scrolling is disabled, user input to the field is limited to the available visible space of the form element. For programmatic access, the application has to take care of respecting the maximum input.

Returns
  • true when text scrolling is enabled.

public TextFormConfiguration.Builder setSpellCheckEnabled (boolean isSpellCheckEnabled)

Sets whether text entered in the field shall be spell-checked, defaults to true.

Parameters
isSpellCheckEnabled true when text content should be spell checked.

public TextFormConfiguration.Builder setText (String text)

Sets text contents.

Parameters
text Text contents to be set.

Protected Methods

protected TextFormConfiguration.Builder getThis ()

Returns correct type of this builder.