Stay organized with collections
Save and categorize content based on your preferences.
public
static
final
class
FormWidgetInfo.Builder
extends Object
Builder for FormWidgetInfo
Summary
Public constructors |
Builder(int widgetType, int widgetIndex, Rect widgetRect, String textValue, String accessibilityLabel)
Creates an instance
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object.
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
Builder
public Builder (int widgetType,
int widgetIndex,
Rect widgetRect,
String textValue,
String accessibilityLabel)
Creates an instance
| Parameters |
widgetType |
int: the type of widget.
Value is one of the following:
|
widgetIndex |
int: the index of the widget in the page's "Annot" array in the PDF.
Value is 0 or greater |
widgetRect |
Rect: the Rect in page coordinates occupied by the widget.
This value cannot be null. |
textValue |
String: the widget's text value.
This value cannot be null. |
accessibilityLabel |
String: the field's accessibility label.
This value cannot be null. |
Public methods
setEditableText
public FormWidgetInfo.Builder setEditableText (boolean editableText)
Sets whether this widget contains editable text. Only supported for comboboxes and
text fields
| Parameters |
editableText |
boolean |
setFontSize
public FormWidgetInfo.Builder setFontSize (float fontSize)
Sets the font size for this widget. Only supported for text fields and comboboxes
| Parameters |
fontSize |
float: Value is 0.0f or greater |
setListItems
public FormWidgetInfo.Builder setListItems (List<ListItem> listItems)
Sets the choice options for this widget. Only supported for comboboxes and list boxes
| Parameters |
listItems |
List: This value cannot be null. |
setMaxLength
public FormWidgetInfo.Builder setMaxLength (int maxLength)
Sets the maximum character length of input text supported by this widget. Only supported
for text fields
| Parameters |
maxLength |
int: Value is 0 or greater |
setMultiLineText
public FormWidgetInfo.Builder setMultiLineText (boolean multiLineText)
Sets whether this widget supports multi-line text input. Only supported for text fields
| Parameters |
multiLineText |
boolean |
setMultiSelect
public FormWidgetInfo.Builder setMultiSelect (boolean multiSelect)
Sets whether this widget supports multiple choice selections. Only supported for
list boxes
| Parameters |
multiSelect |
boolean |
setReadOnly
public FormWidgetInfo.Builder setReadOnly (boolean readOnly)
Sets whether this widget is read-only
| Parameters |
readOnly |
boolean |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-02-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-02-13 UTC."],[],[]]