FormEditInfo


public final class FormEditInfo implements Parcelable


Record of a form filling operation that has been executed on a single form field in a PDF. Contains the minimum amount of data required to replicate the action on the form.

Summary

Constants

static final int

Indicates a click on a clickable form widget

static final int

Represents setting indices on a combobox or listbox form widget

static final int

Represents setting text on a text field or editable combobox form widget

Public fields

static final @NonNull Parcelable.Creator<@NonNull FormEditInfo>

Public methods

static final @NonNull FormEditInfo
createClick(
    @IntRange(from = 0) int widgetIndex,
    @NonNull PdfPoint clickPoint
)

Create a FormEditInfo object of type EDIT_TYPE_CLICK

static final @NonNull FormEditInfo
createSetIndices(
    @IntRange(from = 0) int pageNumber,
    @IntRange(from = 0) int widgetIndex,
    @NonNull int[] selectedIndices
)

Create a FormEditInfo object of type EDIT_TYPE_SET_INDICES

static final @NonNull FormEditInfo
createSetText(
    @IntRange(from = 0) int pageNumber,
    @IntRange(from = 0) int widgetIndex,
    @NonNull String text
)

Create a FormEditInfo object of type EDIT_TYPE_SET_TEXT

int
boolean
equals(Object other)
final PdfPoint
final int

Represents the page number on which the edit occurred

final int
getSelectedIndexAt(int index)

Returns the index of the selected item in the list FormWidgetInfo.listItems at the given index in the list of selected indices.

final int

Returns the count of the selected items.

final String
final int
final int

Represents the index of the widget that was edited.

int
void
writeToParcel(@NonNull Parcel dest, int flags)

Constants

EDIT_TYPE_CLICK

public static final int EDIT_TYPE_CLICK = 0

Indicates a click on a clickable form widget

EDIT_TYPE_SET_INDICES

public static final int EDIT_TYPE_SET_INDICES = 1

Represents setting indices on a combobox or listbox form widget

EDIT_TYPE_SET_TEXT

public static final int EDIT_TYPE_SET_TEXT = 2

Represents setting text on a text field or editable combobox form widget

Public fields

CREATOR

public static final @NonNull Parcelable.Creator<@NonNull FormEditInfoCREATOR

Public methods

createClick

Added in 1.0.0-alpha13
public static final @NonNull FormEditInfo createClick(
    @IntRange(from = 0) int widgetIndex,
    @NonNull PdfPoint clickPoint
)

Create a FormEditInfo object of type EDIT_TYPE_CLICK

Parameters
@IntRange(from = 0) int widgetIndex

The index of the widget that was edited.

@NonNull PdfPoint clickPoint

The point on the pageNumber in PDF coordinates where the click occurred. Note: The origin exists at the top left corner of the page.

See also
viewToPdfPoint

createSetIndices

Added in 1.0.0-alpha13
public static final @NonNull FormEditInfo createSetIndices(
    @IntRange(from = 0) int pageNumber,
    @IntRange(from = 0) int widgetIndex,
    @NonNull int[] selectedIndices
)

Create a FormEditInfo object of type EDIT_TYPE_SET_INDICES

Parameters
@IntRange(from = 0) int pageNumber

The page number on which the edit occurred.

@IntRange(from = 0) int widgetIndex

The index of the widget that was edited.

@NonNull int[] selectedIndices

The indices of the selected items from FormWidgetInfo.listItems

createSetText

Added in 1.0.0-alpha13
public static final @NonNull FormEditInfo createSetText(
    @IntRange(from = 0) int pageNumber,
    @IntRange(from = 0) int widgetIndex,
    @NonNull String text
)

Create a FormEditInfo object of type EDIT_TYPE_SET_TEXT

Parameters
@IntRange(from = 0) int pageNumber

The page number on which the edit occurred.

@IntRange(from = 0) int widgetIndex

The index of the widget that was edited.

@NonNull String text

The text to set on the widget.

describeContents

Added in 1.0.0-alpha13
public int describeContents()

equals

public boolean equals(Object other)

getClickPoint

Added in 1.0.0-alpha13
public final PdfPoint getClickPoint()

getPageNumber

Added in 1.0.0-alpha13
public final int getPageNumber()

Represents the page number on which the edit occurred

getSelectedIndexAt

Added in 1.0.0-alpha13
public final int getSelectedIndexAt(int index)

Returns the index of the selected item in the list FormWidgetInfo.listItems at the given index in the list of selected indices.

Parameters
int index

The position of the selected index to retrieve, from 0 to selectedIndexCount - 1.

Returns
int

The index of the selected item from the list FormWidgetInfo.listItems, returns -1 in case there is no selection or the index is invalid.

getSelectedIndexCount

Added in 1.0.0-alpha13
public final int getSelectedIndexCount()

Returns the count of the selected items.

See also
createSetIndices

'selectedIndices' in FormEditInfo.createSetIndices.

getText

Added in 1.0.0-alpha13
public final String getText()

getType

Added in 1.0.0-alpha13
public final int getType()

getWidgetIndex

Added in 1.0.0-alpha13
public final int getWidgetIndex()

Represents the index of the widget that was edited.

hashCode

public int hashCode()

writeToParcel

Added in 1.0.0-alpha13
public void writeToParcel(@NonNull Parcel dest, int flags)