Foxit PDF SDK
|
Public Member Functions | |
XFAWidget (XFAWidget other) | |
Constructor, with another XFA widget object. More... | |
synchronized void | delete () |
Clean up related resources immediately. More... | |
Bitmap | getBitmap () throws com.foxit.sdk.PDFException |
Get the bitmap of current XFA widget. More... | |
String | getDefaultValue () throws com.foxit.sdk.PDFException |
Get the default value string. More... | |
int | getHAlign () throws com.foxit.sdk.PDFException |
Get text horizontal alignment. More... | |
int | getIndex () throws com.foxit.sdk.PDFException |
Get the index of XFA Widget in related XFA page. More... | |
String | getJavaScript () throws com.foxit.sdk.PDFException |
Get the JavaScript of validation for current XFA widget. More... | |
String | getName (int type) throws com.foxit.sdk.PDFException |
Get Widget name. More... | |
WidgetChoiceOptionArray | getOptions () throws com.foxit.sdk.PDFException |
Get options of a choice list or an Exclusion Group (for radio button only). More... | |
int | getPresence () throws com.foxit.sdk.PDFException |
Get the presence property of the XFA widget. More... | |
RectF | getRect () throws com.foxit.sdk.PDFException |
Get rectangle of XFA widget. More... | |
Signature | getSignature () throws com.foxit.sdk.PDFException |
Get the signature object from current XFA widget. More... | |
String | getToolTip () throws com.foxit.sdk.PDFException |
Get tooltip string. More... | |
int | getType () throws com.foxit.sdk.PDFException |
Get type of XFA widget. More... | |
int | getVAlign () throws com.foxit.sdk.PDFException |
Get text vertical alignment. More... | |
String | getValue () throws com.foxit.sdk.PDFException |
Get the value string. More... | |
XFAPage | getXFAPage () throws com.foxit.sdk.PDFException |
Get the related XFA page, to which current XFA widget belongs. More... | |
boolean | hasEdge (int edge_pos) throws com.foxit.sdk.PDFException |
Check if the edge for specified position exists. More... | |
boolean | isAllowRichText () throws com.foxit.sdk.PDFException |
Check whether the widget allows rich text formatting. More... | |
boolean | isChecked () throws com.foxit.sdk.PDFException |
Check if current XFA widget is checked. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
boolean | isListBox () throws com.foxit.sdk.PDFException |
Check whether the widget is listbox or not. More... | |
boolean | isReadOnly () throws com.foxit.sdk.PDFException |
Check whether the widget is read only. More... | |
boolean | isRequired () throws com.foxit.sdk.PDFException |
Check whether the widget requires a value at the time it is exported by a submit-form action. More... | |
boolean | isSupportMultiline () throws com.foxit.sdk.PDFException |
Check whether the widget supports multiple lines. More... | |
boolean | isSupportMultiSelect () throws com.foxit.sdk.PDFException |
Check whether the widget supports multiple selections. More... | |
boolean | onChar (int input_char, int flags) throws com.foxit.sdk.PDFException |
Call this function when a character code is being input. More... | |
int | onHitTest (PointF point) throws com.foxit.sdk.PDFException |
Call this function to do hit test for a specified point. More... | |
boolean | onKeyDown (int key_code, int flags) throws com.foxit.sdk.PDFException |
Call this function when key on the keyboard is down. More... | |
boolean | onKeyUp (int key_code, int flags) throws com.foxit.sdk.PDFException |
Call this function when key on the keyboard is up. More... | |
boolean | onLButtonDoubleClick (PointF point, int flags) throws com.foxit.sdk.PDFException |
Call this function when left mouse button is double-clicked . More... | |
boolean | onLButtonDown (PointF point, int flags) throws com.foxit.sdk.PDFException |
Call this function when left mouse button is down. More... | |
boolean | onLButtonUp (PointF point, int flags) throws com.foxit.sdk.PDFException |
Call this function when left mouse button is up. More... | |
boolean | onMouseEnter () throws com.foxit.sdk.PDFException |
Call this function when mouse enters current XFA widget. More... | |
boolean | onMouseExit () throws com.foxit.sdk.PDFException |
Call this function when mouse exits. More... | |
boolean | onMouseMove (PointF point, int flags) throws com.foxit.sdk.PDFException |
Call this function when mouse moves. More... | |
boolean | onRButtonDown (PointF point, int flags) throws com.foxit.sdk.PDFException |
Call this function when right mouse is down. More... | |
boolean | onRButtonUp (PointF point, int flags) throws com.foxit.sdk.PDFException |
Call this function when right button is up. More... | |
void | resetData () throws com.foxit.sdk.PDFException |
Reset XFA Widget Data. More... | |
void | setCheckState (boolean is_checked) throws com.foxit.sdk.PDFException |
Set the checked state of the current XFA widget. More... | |
void | setDefaultValue (String value) throws com.foxit.sdk.PDFException |
Set the default value string. More... | |
void | setImage (Image image) throws com.foxit.sdk.PDFException |
Set the image for current XFA widget. More... | |
boolean | setOptions (WidgetChoiceOptionArray option_array) throws com.foxit.sdk.PDFException |
Set options of a choice list or an Exclusion Group (for radio button only). More... | |
void | setValue (String value) throws com.foxit.sdk.PDFException |
Set the value string. More... | |
boolean | validateValue (String value, String format) throws com.foxit.sdk.PDFException |
Validate whether the value conforms to the format of current XFA widget. More... | |
Static Public Attributes | |
static final int | e_HitTestAreaClient = 1 |
Hit test area: Client. | |
static final int | e_HitTestAreaHyperLink = 3 |
Hit test area: HyperLink. | |
static final int | e_HitTestAreaTitleBar = 2 |
Hit test area: Title Bar. | |
static final int | e_HitTestAreaUnknown = 0 |
Hit test area: Unknown. | |
static final int | e_PresenceHidden = 2 |
Presence property: Hidden. Participate in interaction but not layout or rendering. | |
static final int | e_PresenceInactive = 3 |
Presence property: Inactive. Do not participate in interaction, layout, or rendering. | |
static final int | e_PresenceInvisible = 4 |
Presence property: Invisible. Participate in interaction and layout but not rendering. | |
static final int | e_PresenceUnknown = 0 |
Presence property: Unknown. | |
static final int | e_PresenceVisible = 1 |
Presence property: Visible. Participate in interaction, layout, and rendering. | |
static final int | e_WidgetEdgePositionBottom = 2 |
Egde position: bottom. | |
static final int | e_WidgetEdgePositionLeft = 3 |
Egde position: left. | |
static final int | e_WidgetEdgePositionRight = 1 |
Egde position: right. | |
static final int | e_WidgetEdgePositionTop = 0 |
Egde position: top. | |
static final int | e_WidgethAlignTypeCenter = 128 |
Center the text horizontally within the available region. | |
static final int | e_WidgethAlignTypeJustify = 156 |
Left-align the last line and spread-justify the rest. | |
static final int | e_WidgethAlignTypeJustifyAll = 61 |
Spread-justify all lines to fill the available region. | |
static final int | e_WidgethAlignTypeLeft = 252 |
Align the text to the left edge of the available region. | |
static final int | e_WidgethAlignTypeRadix = 231 |
Align the radix indicator. | |
static final int | e_WidgethAlignTypeRight = 54 |
Align the text to the right edge of the available region. | |
static final int | e_WidgetNameTypeCaption = 1 |
Name type: caption name. Name in this type will be retrieved from caption entry. | |
static final int | e_WidgetNameTypeField = 0 |
Name type: field name. Name in this type will be retrieved from XFA widget's name entry and this may an empty string. | |
static final int | e_WidgetNameTypeFullName = 2 |
Name type: full name. | |
static final int | e_WidgetTypeArc = 3 |
XFA widget type: arc. | |
static final int | e_WidgetTypeBarcode = 0 |
XFA widget type: barcode. | |
static final int | e_WidgetTypeCheckButton = 2 |
XFA widget type: check button. | |
static final int | e_WidgetTypeChoiceList = 7 |
XFA widget type: choice list. | |
static final int | e_WidgetTypeDateTimeEdit = 4 |
XFA widget type: date time edit. | |
static final int | e_WidgetTypeExclGroup = 15 |
XFA widget type: Exclusion Group for radio button only. | |
static final int | e_WidgetTypeImage = 16 |
XFA widget type: image. | |
static final int | e_WidgetTypeImageEdit = 8 |
XFA widget type: image edit. | |
static final int | e_WidgetTypeLine = 9 |
XFA widget type: line. | |
static final int | e_WidgetTypeNumericEdit = 5 |
XFA widget type: numeric edit. | |
static final int | e_WidgetTypePasswordEdit = 10 |
XFA widget type: password edit. | |
static final int | e_WidgetTypePushButton = 1 |
XFA widget type: push button. | |
static final int | e_WidgetTypeRadioButton = 11 |
XFA widget type: radio button. | |
static final int | e_WidgetTypeRectangle = 12 |
XFA widget type: rectangle. | |
static final int | e_WidgetTypeSignature = 6 |
XFA widget type: signature. | |
static final int | e_WidgetTypeTextEdit = 13 |
XFA widget type: text edit. | |
static final int | e_WidgetTypeUnknown = 14 |
XFA widget type: unknown. | |
static final int | e_WidgetvAlignTypeBottom = 85 |
Align the text to the bottom of the available region. | |
static final int | e_WidgetvAlignTypeMiddle = 161 |
Align the text so that it is centered between the top and bottom of the available region. | |
static final int | e_WidgetvAlignTypeTop = 33 |
Align the text to the top of the available region. | |
Class XFAWidget represents the XFA widget which is retrieved from XFA page object.
To access the menu of XFA widget, please construct a com.foxit.sdk.addon.xfa.WidgetMenu object with XFAWidget object.
com.foxit.sdk.addon.xfa.XFAWidget.XFAWidget | ( | XFAWidget | other | ) |
Constructor, with another XFA widget object.
[in] | other | Another XFA widget object. |
synchronized void com.foxit.sdk.addon.xfa.XFAWidget.delete | ( | ) |
Clean up related resources immediately.
Reimplemented from com.foxit.sdk.common.Base.
Bitmap com.foxit.sdk.addon.xfa.XFAWidget.getBitmap | ( | ) | throws com.foxit.sdk.PDFException |
Get the bitmap of current XFA widget.
Applicable only when the type of current XFA widget is com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeImageEdit or com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeImage . For types that are not applicable, this function will throw exception com.foxit.sdk.common.Constants.e_ErrUnsupported .
String com.foxit.sdk.addon.xfa.XFAWidget.getDefaultValue | ( | ) | throws com.foxit.sdk.PDFException |
Get the default value string.
int com.foxit.sdk.addon.xfa.XFAWidget.getHAlign | ( | ) | throws com.foxit.sdk.PDFException |
Get text horizontal alignment.
int com.foxit.sdk.addon.xfa.XFAWidget.getIndex | ( | ) | throws com.foxit.sdk.PDFException |
Get the index of XFA Widget in related XFA page.
String com.foxit.sdk.addon.xfa.XFAWidget.getJavaScript | ( | ) | throws com.foxit.sdk.PDFException |
Get the JavaScript of validation for current XFA widget.
String com.foxit.sdk.addon.xfa.XFAWidget.getName | ( | int | type | ) | throws com.foxit.sdk.PDFException |
Get Widget name.
[in] | type | Name type. Please refer to values starting from com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetNameTypeField and this should be one of these values. |
WidgetChoiceOptionArray com.foxit.sdk.addon.xfa.XFAWidget.getOptions | ( | ) | throws com.foxit.sdk.PDFException |
Get options of a choice list or an Exclusion Group (for radio button only).
Applicable for choice list and Exclusion Group (for radio button only). For types that are not applicable, this function will return an empty array.
int com.foxit.sdk.addon.xfa.XFAWidget.getPresence | ( | ) | throws com.foxit.sdk.PDFException |
Get the presence property of the XFA widget.
The presence property controls the participation of the associated object in different phases of processing.
RectF com.foxit.sdk.addon.xfa.XFAWidget.getRect | ( | ) | throws com.foxit.sdk.PDFException |
Get rectangle of XFA widget.
Widget rectangle is defined in XFA coordinate. XFA coordinate is defined as original point in left top, x-axis pointing to right and y-axis pointing down.
Signature com.foxit.sdk.addon.xfa.XFAWidget.getSignature | ( | ) | throws com.foxit.sdk.PDFException |
Get the signature object from current XFA widget.
Applicable only when current XFA widget represents a signature. For types that are not applicable, this function will throw exception com.foxit.sdk.common.Constants.e_ErrUnsupported .
String com.foxit.sdk.addon.xfa.XFAWidget.getToolTip | ( | ) | throws com.foxit.sdk.PDFException |
Get tooltip string.
int com.foxit.sdk.addon.xfa.XFAWidget.getType | ( | ) | throws com.foxit.sdk.PDFException |
Get type of XFA widget.
int com.foxit.sdk.addon.xfa.XFAWidget.getVAlign | ( | ) | throws com.foxit.sdk.PDFException |
Get text vertical alignment.
String com.foxit.sdk.addon.xfa.XFAWidget.getValue | ( | ) | throws com.foxit.sdk.PDFException |
Get the value string.
XFAPage com.foxit.sdk.addon.xfa.XFAWidget.getXFAPage | ( | ) | throws com.foxit.sdk.PDFException |
Get the related XFA page, to which current XFA widget belongs.
boolean com.foxit.sdk.addon.xfa.XFAWidget.hasEdge | ( | int | edge_pos | ) | throws com.foxit.sdk.PDFException |
Check if the edge for specified position exists.
[in] | edge_pos | Edge position to specify which edge will be checked. Please refer to values starting from com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetEdgePositionTop and this should be one of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.isAllowRichText | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the widget allows rich text formatting.
Only text edit widget which type is com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeTextEdit supports rich text.
boolean com.foxit.sdk.addon.xfa.XFAWidget.isChecked | ( | ) | throws com.foxit.sdk.PDFException |
Check if current XFA widget is checked.
Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will return false.
boolean com.foxit.sdk.addon.xfa.XFAWidget.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
boolean com.foxit.sdk.addon.xfa.XFAWidget.isListBox | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the widget is listbox or not.
boolean com.foxit.sdk.addon.xfa.XFAWidget.isReadOnly | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the widget is read only.
boolean com.foxit.sdk.addon.xfa.XFAWidget.isRequired | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the widget requires a value at the time it is exported by a submit-form action.
boolean com.foxit.sdk.addon.xfa.XFAWidget.isSupportMultiline | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the widget supports multiple lines.
Only text edit widget which type is com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeTextEdit supports multiple lines.
boolean com.foxit.sdk.addon.xfa.XFAWidget.isSupportMultiSelect | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the widget supports multiple selections.
Only the list box widget supports multiline selections, whose type is com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeChoiceList and the return value of function xfa.XFAWidget.isListBox is true.
boolean com.foxit.sdk.addon.xfa.XFAWidget.onChar | ( | int | input_char, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when a character code is being input.
[in] | input_char | A character code, in UTF16-LE encoding. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
int com.foxit.sdk.addon.xfa.XFAWidget.onHitTest | ( | PointF | point | ) | throws com.foxit.sdk.PDFException |
Call this function to do hit test for a specified point.
[in] | point | A point to be tested. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onKeyDown | ( | int | key_code, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when key on the keyboard is down.
[in] | key_code | The key code. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_VkeyUnknown and this should be one of these values. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onKeyUp | ( | int | key_code, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when key on the keyboard is up.
[in] | key_code | The key code. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_VkeyUnknown and this should be one of these values. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onLButtonDoubleClick | ( | PointF | point, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when left mouse button is double-clicked .
[in] | point | A point where left mouse button is double-clicked in XFA page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onLButtonDown | ( | PointF | point, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when left mouse button is down.
[in] | point | A point where left mouse button is down in XFA page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onLButtonUp | ( | PointF | point, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when left mouse button is up.
[in] | point | A point where left mouse button is up in XFA page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onMouseEnter | ( | ) | throws com.foxit.sdk.PDFException |
Call this function when mouse enters current XFA widget.
boolean com.foxit.sdk.addon.xfa.XFAWidget.onMouseExit | ( | ) | throws com.foxit.sdk.PDFException |
Call this function when mouse exits.
boolean com.foxit.sdk.addon.xfa.XFAWidget.onMouseMove | ( | PointF | point, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when mouse moves.
[in] | point | A point where left mouse button moves in XFA page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onRButtonDown | ( | PointF | point, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when right mouse is down.
[in] | point | A point where right mouse button is down in XFA page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.onRButtonUp | ( | PointF | point, |
int | flags | ||
) | throws com.foxit.sdk.PDFException |
Call this function when right button is up.
[in] | point | A point where right mouse button is up in XFA page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from com.foxit.sdk.pdf.interform.Filler.e_EventFlagShiftKey and this should be one or a combination of these values. |
void com.foxit.sdk.addon.xfa.XFAWidget.resetData | ( | ) | throws com.foxit.sdk.PDFException |
Reset XFA Widget Data.
void com.foxit.sdk.addon.xfa.XFAWidget.setCheckState | ( | boolean | is_checked | ) | throws com.foxit.sdk.PDFException |
Set the checked state of the current XFA widget.
Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will throw exception com.foxit.sdk.common.Constants.e_ErrUnsupported .
[in] | is_checked | true means the current XFA widget will be checked, while false means it will not be checked. |
void com.foxit.sdk.addon.xfa.XFAWidget.setDefaultValue | ( | String | value | ) | throws com.foxit.sdk.PDFException |
Set the default value string.
It is only useful for the XFA widget which type is com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeTextEdit , com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeNumericEdit , com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypePasswordEdit or com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeDateTimeEdit .
[in] | value | A string as default value to be set. It can be an empty string. |
void com.foxit.sdk.addon.xfa.XFAWidget.setImage | ( | Image | image | ) | throws com.foxit.sdk.PDFException |
Set the image for current XFA widget.
Applicable only when the type of current XFA widget is com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeImageEdit . For types that are not applicable, this function will throw exception com.foxit.sdk.common.Constants.e_ErrUnsupported .
[in] | image | An image will be set to current XFA widget. Currently, this function only supports the following image types:
|
boolean com.foxit.sdk.addon.xfa.XFAWidget.setOptions | ( | WidgetChoiceOptionArray | option_array | ) | throws com.foxit.sdk.PDFException |
Set options of a choice list or an Exclusion Group (for radio button only).
Applicable for choice list and Exclusion Group (for radio button only). For types that are not applicable, this function will return false.
[in] | option_array | An array of choice options to be set. |
void com.foxit.sdk.addon.xfa.XFAWidget.setValue | ( | String | value | ) | throws com.foxit.sdk.PDFException |
Set the value string.
It is only useful for the XFA widget which type is com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeTextEdit , com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeNumericEdit , com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypePasswordEdit or com.foxit.sdk.addon.xfa.XFAWidget.e_WidgetTypeDateTimeEdit .
[in] | value | A string as value to be set. It can be an empty string. |
boolean com.foxit.sdk.addon.xfa.XFAWidget.validateValue | ( | String | value, |
String | format | ||
) | throws com.foxit.sdk.PDFException |
Validate whether the value conforms to the format of current XFA widget.
This function can be called before the function XFAWidget.setValue to check whether the value conforms to the format of current XFA widget.
[in] | value | A string value to be validated. |
[out] | format | A string value that receives the format of current XFA widget. It will be an empty string if current XFA widget has no format. |