FormEditRecord.Builder


public static final class FormEditRecord.Builder
extends Object

java.lang.Object
   ↳ android.graphics.pdf.models.FormEditRecord.Builder


Builder for FormEditRecord

Summary

Public constructors

Builder(int type, int pageNumber, int widgetIndex)

Creates a new instance.

Public methods

FormEditRecord build()

Builds this record

FormEditRecord.Builder setClickPoint(Point clickPoint)

Sets the click point for this record

FormEditRecord.Builder setSelectedIndices(int[] selectedIndices)

Sets the selected indices for this record

FormEditRecord.Builder setText(String text)

Sets the text for this record

Inherited methods

Public constructors

Builder

public Builder (int type, 
                int pageNumber, 
                int widgetIndex)

Creates a new instance.

Parameters
type int: the type of FormEditRecord to create Value is FormEditRecord.EDIT_TYPE_CLICK, FormEditRecord.EDIT_TYPE_SET_INDICES, or FormEditRecord.EDIT_TYPE_SET_TEXT

pageNumber int: the page number of which the record is Value is 0 or greater

widgetIndex int: the index of the widget within the page's "Annot" array in the PDF Value is 0 or greater

Throws
IllegalArgumentException if a negative page number or widget index is provided

Public methods

build

public FormEditRecord build ()

Builds this record

Returns
FormEditRecord This value cannot be null.

Throws
NullPointerException if the click point is not provided for a click type record, if the selected indices are not provided for a set indices type record, or if the text is not provided for a set text type record

setClickPoint

public FormEditRecord.Builder setClickPoint (Point clickPoint)

Sets the click point for this record

Parameters
clickPoint Point: This value may be null.

Returns
FormEditRecord.Builder This value cannot be null.

Throws
IllegalArgumentException if this is not a click type record

setSelectedIndices

public FormEditRecord.Builder setSelectedIndices (int[] selectedIndices)

Sets the selected indices for this record

Parameters
selectedIndices int: This value may be null.

Returns
FormEditRecord.Builder This value cannot be null.

Throws
IllegalArgumentException if this is not a set indices type record

setText

public FormEditRecord.Builder setText (String text)

Sets the text for this record

Parameters
text String: This value may be null.

Returns
FormEditRecord.Builder This value cannot be null.

Throws
IllegalArgumentException if this is not a set text type record