Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.pdf.interform.FillerAssistCallback Class Reference

## Public Member Functions
boolean | appendPopupMenuItem (java.lang.Object h_popup_menu, int popup_menu_item, String default_string)
| A callback function which is triggered when need to append popup menu item to popup menu. More...
java.lang.Object | createPopupMenu ()
| A callback function which is triggered when need to create a popup menu. More...
void | destroyPopupMenu (java.lang.Object h_popup_menu)
| A callback function which is triggered when need to destroy popup menu. More...
boolean | enablePopupMenuItem (java.lang.Object h_popup_menu, int popup_menu_item, boolean is_enabled)
| A callback function which is triggered when need to enable specified popup menu item in popup menu. More...
void | focusGotOnControl (Control control, String value)
| A callback function which is triggered when the focus is set to a form control. More...
void | focusLostFromControl (Control control, String value)
| A callback function which is triggered when the focus is lost from a form control. More...
String | getClipboardText ()
| A callback function which is triggered when need to get the text on clipboard. More...
int | getVersion ()
| Get the version of derived implementation, for compatibility reason. More...
boolean | killTimer (int timer_id)
| A callback function used to kill the timer event by timer identifier. More...
void | refresh (PDFPage page, RectF rect)
| A callback function used to refresh the specified area on a specified page. More...
void | release ()
| A callback function used to release current callback object itself. More...
void | reportInvalidValue (String form_field_name, String invalid_value)
| A callback function which is triggered when user entered an invalid value. More...
void | setClipboardText (String text)
| A callback function which is triggered when need to set clipboard text. More...
boolean | setTimerCallback (int elapse, TimerCallback timer, java.lang.Integer out_timer_id)
| A callback function used to set a system timer. More...
boolean | showPopupMenu (java.lang.Object h_popup_menu, PointF point)
| A callback function which is triggered when need to show popup menu. More...

## Static Public Attributes
static final int | e_PopupMenuItemCopy = 2
| Popup menu item: "Copy".
static final int | e_PopupMenuItemCut = 1
| Popup menu item: "Cut".
static final int | e_PopupMenuItemDelete = 4
| Popup menu item: "Delete".
static final int | e_PopupMenuItemNone = 0
| No popup menu item.
static final int | e_PopupMenuItemPaste = 3
| Popup menu item: "Paste".
static final int | e_PopupMenuItemSelectAll = 5
| Popup menu item: "Select All".

## Detailed Description

This class represents a callback object to assist form filler. All the pure virtual functions in this class are used as callback functions and should be implemented by user.

## Member Function Documentation

## ◆ appendPopupMenuItem()

boolean com.foxit.sdk.pdf.interform.FillerAssistCallback.appendPopupMenuItem | ( | java.lang.Object | h_popup_menu,
|  | int | popup_menu_item,
|  | String | default_string
| ) |  |

A callback function which is triggered when need to append popup menu item to popup menu.

This callback function supports text field, combo box field.

Parameters

  [in] | h_popup_menu | Popup menu handle.
  [in] | popup_menu_item | A value to specify the exact popup menu item. Please refer to values starting from com.foxit.sdk.pdf.interform.FillerAssistCallback.e_PopupMenuItemNone and this would be one of these values.
  [in] | default_string | Default string for the specified popup menu item.

Returns
  true means success, while false means failure.

## ◆ createPopupMenu()

java.lang.Object com.foxit.sdk.pdf.interform.FillerAssistCallback.createPopupMenu | ( |  | ) |

A callback function which is triggered when need to create a popup menu.

This callback function supports text field, combo box field.

Returns
  Popup menu handle.

## ◆ destroyPopupMenu()

void com.foxit.sdk.pdf.interform.FillerAssistCallback.destroyPopupMenu | ( | java.lang.Object | h_popup_menu | ) |

A callback function which is triggered when need to destroy popup menu.

This callback function supports text field, combo box field.

Parameters

  [in] | h_popup_menu | Popup menu handle.

Returns
  None.

## ◆ enablePopupMenuItem()

boolean com.foxit.sdk.pdf.interform.FillerAssistCallback.enablePopupMenuItem | ( | java.lang.Object | h_popup_menu,
|  | int | popup_menu_item,
|  | boolean | is_enabled
| ) |  |

A callback function which is triggered when need to enable specified popup menu item in popup menu.

This callback function supports text field, combo box field.

Parameters

  [in] | h_popup_menu | Popup menu handle.
  [in] | popup_menu_item | A value to specify the exact popup menu item. Please refer to values starting from com.foxit.sdk.pdf.interform.FillerAssistCallback.e_PopupMenuItemNone and this would be one of these values.
  [in] | is_enabled | A boolean value to decide whether to enable the specified popup menu item or disable it.

Returns
  true means success, while false means failure.

## ◆ focusGotOnControl()

void com.foxit.sdk.pdf.interform.FillerAssistCallback.focusGotOnControl | ( | Control | control,
|  | String | value
| ) |  |

A callback function which is triggered when the focus is set to a form control.

This callback function supports text field, combo box field, list box field, push button field, check box field, radio button field.

Parameters

  [in] | control | The form control object to which the focus is set.
  [in] | value | The value of form field associated with the control. If the control belongs to a push button field, this value would always be an empty string.

Returns
  None.

## ◆ focusLostFromControl()

void com.foxit.sdk.pdf.interform.FillerAssistCallback.focusLostFromControl | ( | Control | control,
|  | String | value
| ) |  |

A callback function which is triggered when the focus is lost from a form control.

This callback function supports text field, combo box field, list box field, push button field, check box field, radio button field.

Parameters

  [in] | control | The form control object, from which the focus is lost.
  [in] | value | The value of form field associated with the control. If the control belongs to a push button field, this value would always be an empty string.

Returns
  None.

## ◆ getClipboardText()

String com.foxit.sdk.pdf.interform.FillerAssistCallback.getClipboardText | ( |  | ) |

A callback function which is triggered when need to get the text on clipboard.

This callback function supports text field, combo box field.

Returns
  The text on clipboard.

## ◆ getVersion()

int com.foxit.sdk.pdf.interform.FillerAssistCallback.getVersion | ( |  | ) |

Get the version of derived implementation, for compatibility reason.

Returns
  Version of derived implementation.

## ◆ killTimer()

boolean com.foxit.sdk.pdf.interform.FillerAssistCallback.killTimer | ( | int | timer_id | ) |

A callback function used to kill the timer event by timer identifier.

Parameters

  [in] | timer_id | The timer identifier returned by an earlier calling of callback function FillerAssistCallback.setTimerCallback .

Returns
  true means success, while false means failure.

## ◆ refresh()

void com.foxit.sdk.pdf.interform.FillerAssistCallback.refresh | ( | PDFPage | page,
|  | RectF | rect
| ) |  |

A callback function used to refresh the specified area on a specified page.

Parameters

  [in] | page | A PDF page object.
  [in] | rect | A rectangle that specifies the area on the page to be redrawn. null means to refresh the whole page.

Returns
  None.

## ◆ release()

void com.foxit.sdk.pdf.interform.FillerAssistCallback.release | ( |  | ) |

A callback function used to release current callback object itself.

Returns
  None.

## ◆ reportInvalidValue()

void com.foxit.sdk.pdf.interform.FillerAssistCallback.reportInvalidValue | ( | String | form_field_name,
|  | String | invalid_value
| ) |  |

A callback function which is triggered when user entered an invalid value.

This callback function supports text field, combo box field.

Parameters

  [in] | form_field_name | The name of form field associated with the control.
  [in] | invalid_value | The invalid value of form field associated with the control.

Returns
  None.

## ◆ setClipboardText()

void com.foxit.sdk.pdf.interform.FillerAssistCallback.setClipboardText | ( | String | text | ) |

A callback function which is triggered when need to set clipboard text.

This callback function supports text field, combo box field.

Parameters

  [in] | text | The text need to be set to clipboard.

Returns
  None.

## ◆ setTimerCallback()

boolean com.foxit.sdk.pdf.interform.FillerAssistCallback.setTimerCallback | ( | int | elapse,
|  | TimerCallback | timer,
|  | java.lang.Integer | out_timer_id
| ) |  |

A callback function used to set a system timer.

This callback function is called to install a system timer. When a time-out value is specified, and every time when a time-out occurs, the system passes a message to the timer callback function.

Parameters

  [in] | elapse | Specifies the time-out value, in milliseconds.
  [in] | timer | A TimerCallback object as timer.
  [out] | out_timer_id | Output parameter that receives the timer identifier of the new timer if the function is finished successfully. This value would be passed to callback function FillerAssistCallback.killTimer to kill the timer. Nonzero if the function is successful; otherwise, this should be zero.

Returns
  true means success, while false means failure.

## ◆ showPopupMenu()

boolean com.foxit.sdk.pdf.interform.FillerAssistCallback.showPopupMenu | ( | java.lang.Object | h_popup_menu,
|  | PointF | point
| ) |  |

A callback function which is triggered when need to show popup menu.

This callback function supports text field, combo box field.

Parameters

  [in] | h_popup_menu | Popup menu handle.
  [in] | point | Left-top point used to locate where to show the popup menu, in PDF coordinate system.

Returns
  true means success, while false means failure.