|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfAnnot
com.gnostice.pdfone.PdfProAnnot
com.gnostice.pdfone.PdfFormField
This is a base class from which all form field classes are derived.
In document creation mode
, a
form field can be added to a page by calling the method
PdfPage.addFormField(PdfFormField)
.
In document reading mode
, a
list of form fields in a page can be obtained by calling the method
PdfPage.getAllFormFields()
.
A form field is identified in the document by its "name
."
However, an optional "mapping name
"
can be specified for the form field so that:
An optional "alternate name
"
can be specified. This name will be used:
All these names can be specified in overloaded constructors of this class and its sub classes.
PdfWriter writer1 = PdfWriter.fileWriter( new File("PdfFormField_example.pdf")); PdfDocument doc1 = new PdfDocument(writer1); doc1.setOverrideFieldAppearanceStreams(true); // Create a PDF page PdfPage page = new PdfPage(); // Create a text box form field PdfFormField ff1 = new PdfFormTextField( new PdfRect(300, 100, 100, 20), "tf_name"); ff1.setBorderColor(Color.BLACK); ff1.setValue("Enter name here"); ff1.setNameAsUnicode(false); PdfFormField ff2 = new PdfFormPushButton( new PdfRect(300, 130, 35, 20), "pb_submit", " Submit "); // Create a push button form field ff2.setBorderStyle(PdfAnnot.BORDERSTYLE_BEVELED); ff2.setBorderColor(Color.GRAY); ff2.setBackgroundColor(Color.LIGHT_GRAY); ff2.addActionFormSubmit( PdfEvent.ON_MOUSE_DOWN, "http://www.gnostice.com/newsletters/demos/200804/forms_test.asp"); ff2.setNameAsUnicode(false); // Add the form field to the page page.addFormField(ff1); page.addFormField(ff2); page.writeText("Enter name", 225, 105); doc1.add(page); doc1.setOpenAfterSave(true); doc1.write(); writer1.dispose();
Field Summary | |
static int |
ALIGNMENT_CENTER
Constant for aligning text inside a form field to both left and right. |
static int |
ALIGNMENT_LEFT
Constant for aligning text inside a form field to left. |
static int |
ALIGNMENT_RIGHT
Constant for aligning text inside a form field to right. |
static int |
BUTTON_STATE_OFF
Constant for specifying that a radio button/check box is not selected. |
static int |
BUTTON_STATE_ON
Constant for specifying that a radio button/check box is selected. |
static int |
FLAG_CHOICE_COMMIT_ON_SEL_CHANGE
A flag indicating that actions associated with the list box or combo box form field are executed immediately when an option is selected. |
static int |
FLAG_CHOICE_MULTISELECT
A flag indicating that multiple options in a combo box/list box can be selected. |
static int |
FLAG_NO_EXPORT
A flag indicating that the form field will not be submitted when the form is submitted. |
static int |
FLAG_NO_SPELLCHECK
A flag indicating that text option entered by the user in the combo box is not spell-checked. |
static int |
FLAG_NONE
A flag indicating that no other has been set and that the field simply inherits the flags of the parent form field. |
static int |
FLAG_RADIO_IN_UNISON
A flag indicating that the radio button can be selected or deselected in unison with other radio buttons in its group. |
static int |
FLAG_RADIO_NO_TOGGLE_TO_OFF
A flag indicating that the radio button or another one in its group will remain selected at any time. |
static int |
FLAG_READONLY
A flag indicating that the form field's properties cannot be changed by the user. |
static int |
FLAG_REQUIRED
A flag indicating that the form field needs to have a value when the form is submitted. |
static int |
FLAG_SUBMIT_TYPE_FDF
|
static int |
HIGHLIGHT_MODE_INVERT
Highlight mode for a form field that makes the contents inside its bounding box appear inverted. |
static int |
HIGHLIGHT_MODE_NONE
Highlight mode for a form field that makes it appear without any change from its normal appearance. |
static int |
HIGHLIGHT_MODE_OUTLINE
Highlight mode for a form field that makes the border of its bounding box appear inverted. |
static int |
HIGHLIGHT_MODE_PUSH
Highlight mode for a form field that makes it look as if it were pushed up from below the surface of the page. |
static int |
HIGHLIGHT_MODE_TOGGLE
Deprecated. Instead, use HIGHLIGHT_MODE_PUSH . |
static int |
ROTATION_0
Constant for rotation of a form field by 0 degrees. |
static int |
ROTATION_180
Constant for rotation of a form field by 180 degrees. |
static int |
ROTATION_270
Constant for rotation of a form field by 270 degrees. |
static int |
ROTATION_90
Constant for rotation of a form field by 90 degrees. |
static int |
SUBMIT_ACTION_TYPE_FDF
|
static int |
SUBMIT_ACTION_TYPE_HTML_POST
|
static int |
SUBMIT_ACTION_TYPE_XFDF
|
static int |
TYPE_CHECKGROUP
Constant specifying that a form field is a check box group. |
static int |
TYPE_COMBOBOX
Constant specifying that a form field is a combo box. |
static int |
TYPE_LISTBOX
Constant specifying that a form field is a list box. |
static int |
TYPE_PUSHBUTTON
Constant specifying that a form field is a push button. |
static int |
TYPE_RADIOGROUP
Constant specifying that a form field is a radio button group. |
static int |
TYPE_SIGNATURE
|
static int |
TYPE_TEXTFIELD
Constant specifying that a form field is a text field. |
Constructor Summary | |
PdfFormField(int type,
String name)
Constructs a form field of specified type with specified name. |
|
PdfFormField(int type,
String name,
int fieldflags)
Constructs a form field of specified type with specified name and flags. |
|
PdfFormField(int type,
String name,
String alternateName,
String mappingName)
Constructs a form field of specified type with specified name, alternate name and flags. |
|
PdfFormField(int type,
String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a form field of specified type with specified name, alternate name, mapping name and flags. |
|
PdfFormField(String name)
Constructs a form field with specified name. |
|
PdfFormField(String name,
int fieldflags)
Constructs a form field with specified name and flags. |
|
PdfFormField(String name,
String alternateName,
String mappingName)
Constructs a form field with specified name, alternate name, and mapping name. |
|
PdfFormField(String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a form field with specified name, alternate name, mapping name, and flags. |
Method Summary | |
void |
addAction(int eventType,
int namedAction)
Adds specified named action to specified event of the form field. |
void |
addAction(int actionType,
int eventType,
String javascriptOrUri)
Adds specified Javascript or URI action to specified event of the form field. |
void |
addAction(int actionType,
int eventType,
String applicationToLaunch,
boolean isPrint)
Adds specified launch action to specified event of the form field. |
void |
addActionFormReset(int eventType)
Adds an action to reset the form for the specified event of this form field. |
void |
addActionFormReset(int eventType,
ArrayList fields,
boolean exclude)
Adds an action to exclusively reset or not reset specified form fields for specified event of this form field. |
void |
addActionFormReset(int eventType,
PdfFormField field,
boolean exclude)
Adds an action to exclusively reset or not reset specified form field for specified event of this form field. |
void |
addActionFormSubmit(int eventType,
String URI)
Add an action to submit the form to specified URI for specified event of this form field. |
void |
addActionFormSubmit(int eventType,
String URI,
ArrayList fields,
boolean exclude)
Adds an action to exclusively submit or not submit specified form fields to a specified URI for specified event of this form field. |
void |
addActionFormSubmit(int eventType,
String URI,
PdfFormField field,
boolean exclude)
Adds an action to exclusively submit or not submit a specified form field to a specified URI for specified event of this form field. |
void |
addActionImportData(int eventType,
String fdfFileName)
Adds an action to import FDF (Forms Data Form) data into the form from a specified file for specified event of the form field. |
void |
addChildField(PdfFormField child)
Adds specified form field as a child form field to this form field. |
Object |
clone()
|
void |
flatten()
Flattens this form field. |
void |
flatten(boolean flattenWithNewValue)
Flattens this form field with or without its new value. |
String |
getAlternateName()
Returns alternate name of the form field. |
Color |
getBackgroundColor()
Returns background color of the form field. |
Color |
getBorderColor()
Return border color of the form field. |
List |
getCheckGroupItems()
Returns list of check box fields in this (check box group) form field. |
int[] |
getCheckGroupSelectedIndices()
Returns indices of selected check box fields in this (check box group) form field. |
List |
getCheckGroupSelectedValues()
Return list of selected check box fields in this (check box group) form field. |
int |
getChildCount()
Returns number of children form fields for this group form field. |
List |
getChildList()
Returns list of children form fields for this group form field. |
String |
getDefaultValue()
Returns default value that the form field reverts to when the form is reset. |
PdfAppearanceStream |
getDownAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
int |
getFieldFlags()
Returns flags specified for the form field. |
PdfFont |
getFont()
Returns font specified for this form field. |
String |
getFullyQualifiedName()
Returns a dot-delimited string representing parent-child hierarchy of the form field. |
String |
getMappingName()
Returns "mapping name" of the form field. |
String |
getName()
Returns name used to identify the form field in the document. |
PdfAppearanceStream |
getNormalAppearance()
Returns the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
PdfPopUpAnnot |
getPopup()
Returns a popup annotation that needs to be used by a viewer application to display the popup window for this annotation. |
int[] |
getRadioGroupSelectedIndices()
Returns indices of radio button fields that are selected in this (radio button group) form field. |
List |
getRadioGroupSelectedValues()
Returns list of radio button fields that are selected in this (radio button group) form field. |
PdfAppearanceStream |
getRolloverAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation when the user places the mouse pointer over the annotation (and does not hold down the mouse button). |
int |
getRotation()
Returns angle of rotation of the form field. |
int |
getType()
Returns form field type. |
String |
getValue()
Returns current value of the form field. |
boolean |
isFlattened()
|
boolean |
isNameAsUnicode()
Returns whether all names of the form field is required to be specified in Unicode. |
boolean |
isNoExport()
Returns whether form field is not required to be submitted when the form is submitted. |
boolean |
isNoSpellCheck()
Returns whether the text option entered by a user in the combo box is not required to be spell-checked by a viewer application. |
boolean |
isRadioInUnison()
Returns whether the FLAG_RADIO_IN_UNISON flag for the
form field has been set. |
boolean |
isRadioNoToggleToOff()
Returns whether the FLAG_RADIO_NO_TOGGLE_TO_OFF flag
is set or cleared for the form field. |
boolean |
isReadOnly()
Returns whether the form field properties cannot be changed by the user on a viewer application. |
boolean |
isRequired()
Returns whether the form field needs to have a value when the form is submitted. |
void |
setAlternateName(String alternateName)
Specify an "alternate name" for the form field. |
void |
setBackgroundColor(Color backgroundColor)
Specify background color for the form field. |
void |
setBorderColor(Color borderColor)
Specify border color for the form field. |
void |
setDefaultValue(String defaultValue)
Specifies a value that the form field needs to revert to when the form is reset. |
void |
setDownAppearance(PdfAppearanceStream downAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
void |
setFieldFlags(int fieldFlags)
Specifies flags for the form field. |
void |
setFont(PdfFont font)
Specifies a font that needs to be used to display the contents of this form field. |
void |
setIncludeNoValueFieldsOnSubmit(boolean includeNoValueFieldsOnSubmit)
|
void |
setMappingName(String mappingName)
Specifies a "mapping name" for the form field. |
void |
setName(String name)
Specifies a name that will be used to identify the form field in the document. |
void |
setNameAsUnicode(boolean isNameAsUnicode)
Specifies whether all names of the form field needs to be specified in Unicode. |
void |
setNoExport(boolean noExport)
Specifies whether form field is not required to be submitted when the form is submitted. |
void |
setNormalAppearance(PdfAppearanceStream normalAppearance)
Specifies the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
void |
setNoSpellCheck(boolean noSpellCheck)
Specifies whether the text option entered by a user in the combo box needs not to be spell-checked by a viewer application. |
void |
setParentAsNull()
Removes this form field from its group. |
void |
setPopup(PdfPopUpAnnot popup,
boolean overridePopUpProperties)
Specifies a popup annotation that needs to be used by a viewer application to display the popup window for this annotation. |
void |
setRadioInUnison(boolean radioInUnison)
Sets or clears the FLAG_RADIO_IN_UNISON flag for the
form field. |
void |
setRadioNoToggleToOff(boolean radioToggleToOff)
Sets or clears the FLAG_RADIO_NO_TOGGLE_TO_OFF flag
for the form field. |
void |
setReadOnly(boolean readOnly)
Specifies whether the form field properties cannot be changed by the user on a viewer application. |
void |
setRequired(boolean required)
Specifies whether the form field needs to have a value when the form is submitted. |
void |
setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field (and does not hold down the mouse button). |
void |
setRotation(int rotation)
Specifies angle of rotation of the form field. |
void |
setSubmitActionType(int submitActionType)
|
void |
setType(int type)
Specifies form field type. |
void |
setValue(String value)
Specifies a new value for the form field. |
Methods inherited from class com.gnostice.pdfone.PdfAnnot |
delete, getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, hashCode, isDeleted, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setRect, setRect, setRect, setRect, setRect, setShowRect, setSubject, setTitle |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BUTTON_STATE_OFF
public static final int BUTTON_STATE_ON
public static final int FLAG_NONE
public static final int FLAG_READONLY
public static final int FLAG_REQUIRED
public static final int FLAG_NO_EXPORT
public static final int FLAG_CHOICE_MULTISELECT
public static final int FLAG_NO_SPELLCHECK
public static final int FLAG_CHOICE_COMMIT_ON_SEL_CHANGE
public static final int FLAG_RADIO_IN_UNISON
public static final int FLAG_RADIO_NO_TOGGLE_TO_OFF
public static final int SUBMIT_ACTION_TYPE_HTML_POST
public static final int SUBMIT_ACTION_TYPE_FDF
public static final int SUBMIT_ACTION_TYPE_XFDF
public static final int FLAG_SUBMIT_TYPE_FDF
public static final int HIGHLIGHT_MODE_NONE
public static final int HIGHLIGHT_MODE_INVERT
public static final int HIGHLIGHT_MODE_OUTLINE
public static final int HIGHLIGHT_MODE_PUSH
public static final int HIGHLIGHT_MODE_TOGGLE
HIGHLIGHT_MODE_PUSH
.
public static final int ALIGNMENT_LEFT
public static final int ALIGNMENT_CENTER
public static final int ALIGNMENT_RIGHT
public static final int TYPE_PUSHBUTTON
public static final int TYPE_TEXTFIELD
public static final int TYPE_RADIOGROUP
added
to a radio button
group field.
public static final int TYPE_CHECKGROUP
public static final int TYPE_LISTBOX
public static final int TYPE_COMBOBOX
public static final int ROTATION_0
setRotation(int)
,
getRotation()
,
Constant Field Valuespublic static final int ROTATION_90
setRotation(int)
,
getRotation()
,
Constant Field Valuespublic static final int ROTATION_180
setRotation(int)
,
getRotation()
,
Constant Field Valuespublic static final int ROTATION_270
setRotation(int)
,
getRotation()
,
Constant Field Valuespublic static final int TYPE_SIGNATURE
Constructor Detail |
public PdfFormField(int type, String name)
type
- constant specifying the type of the form field.name
- name of the form field in the document.setName(String)
public PdfFormField(int type, String name, int fieldflags)
type
- constant specifying the type of the form field.name
- name of the form field in the document.fieldflags
- form field flags.public PdfFormField(int type, String name, String alternateName, String mappingName, int fieldFlags)
type
- constant specifying the type of the form field.name
- name of the form field in the document.alternateName
- alternate name of the form field.mappingName
- mapping name of the form field.fieldFlags
- form field flags.public PdfFormField(int type, String name, String alternateName, String mappingName)
type
- constant specifying the type of the form field.name
- name of the form field in the document.alternateName
- alternate name of the form field.mappingName
- mapping name of the form field.public PdfFormField(String name)
name
- name of the form field in the document.public PdfFormField(String name, int fieldflags)
name
- name of the form field in the document.fieldflags
- form field flags.public PdfFormField(String name, String alternateName, String mappingName, int fieldFlags)
name
- name of the form field in the document.alternateName
- alternate name of the form field.mappingName
- mapping name of the form field.fieldFlags
- form field flags.public PdfFormField(String name, String alternateName, String mappingName)
name
- name of the form field in the document.alternateName
- alternate name of the form field.mappingName
- mapping name of the form field.Method Detail |
public Object clone()
public int getRotation()
setRotation(int)
public void setRotation(int rotation) throws PdfException
rotation
- constant specifying angle of rotation of the for
field
PdfException
- if rotation is set to angle other than
ROTATION_0
, ROTATION_90
,
ROTATION_180
, and ROTATION_270
.getRotation()
public PdfFont getFont()
setFont(PdfFont)
public void setFont(PdfFont font)
font
- Specifies a font that needs to be used to display
the contents of this form field.getFont()
public String getMappingName()
original name
.
setMappingName(String)
,
getName()
public void setMappingName(String mappingName)
original name
.
mappingName
- name that needs to be used for identifying the form
field only when form contents are exportedgetMappingName()
,
setName(String)
,
setAlternateName(String)
public String getAlternateName()
getName()
,
getMappingName()
,
setAlternateName(String)
public void setAlternateName(String alternateName)
alternateName
- "alternate name" for the form field.getAlternateName()
,
getName()
,
getMappingName()
public String getName()
"mapping name"
.
setName(String)
,
getMappingName()
public void setName(String name)
"mapping name"
.
name
- name that needs to be used to identify the form
field in the documentgetName()
,
setMappingName(String)
public String getFullyQualifiedName()
public final int getFieldFlags()
flags
specified for the form
fieldsetFieldFlags(int)
public final void setFieldFlags(int fieldFlags)
fieldFlags
- flags for the form fieldpublic String getValue()
setValue(String)
,
setDefaultValue(String)
public String getDefaultValue()
getValue()
,
setDefaultValue(String)
,
addActionFormReset(int)
public void setValue(String value)
value
- a new value for the form fieldgetValue()
,
setDefaultValue(String)
,
addActionFormReset(int)
,
addActionFormSubmit(int, String)
public void setDefaultValue(String defaultValue)
defaultValue
- value that the form field needs to revert to when
the form is resetgetDefaultValue()
,
setValue(String)
,
addActionFormReset(int)
public boolean isRadioInUnison()
FLAG_RADIO_IN_UNISON
flag for the
form field has been set.
FLAG_RADIO_IN_UNISON
flag for the
form field has been setsetRadioInUnison(boolean)
public void setRadioInUnison(boolean radioInUnison) throws PdfException
FLAG_RADIO_IN_UNISON
flag for the
form field.
radioInUnison
- whether to set or clear the
FLAG_RADIO_IN_UNISON
flag. If
true
, the flag is set. If
false
, the flag is cleared.
PdfException
isRadioInUnison()
public boolean isRadioNoToggleToOff()
FLAG_RADIO_NO_TOGGLE_TO_OFF
flag
is set or cleared for the form field.
FLAG_RADIO_NO_TOGGLE_TO_OFF
flag
is set or cleared for the form fieldsetRadioNoToggleToOff(boolean)
public void setRadioNoToggleToOff(boolean radioToggleToOff) throws PdfException
FLAG_RADIO_NO_TOGGLE_TO_OFF
flag
for the form field.
radioToggleToOff
- whether to set or clear the
FLAG_RADIO_NO_TOGGLE_TO_OFF
flag. If
true
, the flag is set; if
false
, the flag is cleared.
PdfException
isRadioNoToggleToOff()
public boolean isNoExport()
setNoExport(boolean)
,
FLAG_NO_EXPORT
public void setNoExport(boolean noExport)
noExport
- whether form field is not required to be submitted
when the form is submittedisNoExport()
,
FLAG_NO_EXPORT
public boolean isReadOnly()
setReadOnly(boolean)
,
FLAG_READONLY
public void setReadOnly(boolean readOnly)
readOnly
- whether the form field properties cannot be changed
by the user on a viewer applicationisReadOnly()
,
FLAG_READONLY
public boolean isRequired()
setRequired(boolean)
,
FLAG_REQUIRED
public void setRequired(boolean required)
required
- If set to true
, the form containing
the form field can be submitted only when the field
has a value.isRequired()
,
FLAG_REQUIRED
public boolean isNoSpellCheck()
setNoSpellCheck(boolean)
,
FLAG_NO_SPELLCHECK
public void setNoSpellCheck(boolean noSpellCheck)
noSpellCheck
- whether the text option entered by a user in the
combo box needs not to be spell-checked by the
viewer applicationisNoSpellCheck()
,
FLAG_NO_SPELLCHECK
public Color getBackgroundColor()
setBackgroundColor(Color)
public void setBackgroundColor(Color backgroundColor)
backgroundColor
- background color for the form fieldgetBackgroundColor()
public Color getBorderColor()
setBorderColor(Color)
public void setType(int type)
type
- constant specifying form field typegetType()
public int getType()
getType
in class PdfAnnot
setType(int)
public void setBorderColor(Color borderColor)
borderColor
- border color for the form fieldpublic PdfPopUpAnnot getPopup()
com.gnostice.pdfone.PdfProAnnot
public void setPopup(PdfPopUpAnnot popup, boolean overridePopUpProperties)
com.gnostice.pdfone.PdfProAnnot
popup
- popup annotation that needs to be used as the popup
windowoverridePopUpProperties
- whether a viewer application should override the
properties of the popup annotation with those of
this annotationPdfProAnnot.getPopup()
public void flatten(boolean flattenWithNewValue)
flattenWithNewValue
- whether to flatten the form field with or without
its new valuePdfProDocument.flattenFormFields(boolean)
public void flatten()
PdfProDocument.flattenFormFields()
public boolean isFlattened()
public final void addChildField(PdfFormField child) throws PdfException
this
form field.
child
- form field that needs to be added as a child
PdfException
- if an illegal argument is supplied, or if
this
form field is not an object of
PdfFormField
class but an object of
a class derived from PdfFormField
.TYPE_CHECKGROUP
,
TYPE_RADIOGROUP
public List getChildList()
TYPE_CHECKGROUP
,
TYPE_RADIOGROUP
,
PdfProDocument.addFormField(PdfFormField, String[])
public List getCheckGroupItems()
public int getChildCount()
TYPE_CHECKGROUP
,
TYPE_RADIOGROUP
,
PdfProDocument.addFormField(PdfFormField f, String[]
pageRanges)
public int[] getRadioGroupSelectedIndices()
public List getRadioGroupSelectedValues()
public int[] getCheckGroupSelectedIndices()
public List getCheckGroupSelectedValues()
public void setSubmitActionType(int submitActionType) throws PdfException
PdfException
public void setIncludeNoValueFieldsOnSubmit(boolean includeNoValueFieldsOnSubmit)
public void addActionFormSubmit(int eventType, String URI) throws PdfException
eventType
- constant specifying the event.URI
- URI to which the form needs to be submitted.
PdfException
- if an illegal argument is supplied.public void addActionFormSubmit(int eventType, String URI, ArrayList fields, boolean exclude) throws PdfException
eventType
- constant specifying the event.URI
- URI to which the form needs to be submitted.fields
- form fields that need to be included or not included
when the form is submitted.exclude
- if true, the specified form fields are submitted. If
not, all other form fields are submitted.
PdfException
- if an illegal argument is supplied.public void addActionFormSubmit(int eventType, String URI, PdfFormField field, boolean exclude) throws PdfException
eventType
- constant specifying the event.URI
- URI to which the specified form field needs to be
submitted.field
- form field that need to be included or excluded by
the submit action.exclude
- if true
, the specified form field is
reset. If not, all other form fields are reset.
PdfException
- if an illegal argument is supplied.public void addActionFormReset(int eventType) throws PdfException
eventType
- constant specifying the event
PdfException
- if an illegal argument is supplied.PdfAction
,
PdfAction.PdfEvent
,
getDefaultValue()
,
getValue()
public void addActionFormReset(int eventType, PdfFormField field, boolean exclude) throws PdfException
eventType
- constant specifying the event.field
- form field that need to be included or excluded by
the reset action.exclude
- if true
, the specified form field is
reset. If not, all other form fields are reset.
PdfException
- if an illegal argument is supplied.PdfAction
,
PdfAction.PdfEvent
,
getDefaultValue()
,
getValue()
public void addActionImportData(int eventType, String fdfFileName) throws PdfException
eventType
- constant specifying the event.fdfFileName
- pathname of the file containing FDF data
PdfException
- if an illegal argument is supplied.public void addActionFormReset(int eventType, ArrayList fields, boolean exclude) throws PdfException
eventType
- constant specifying the event.fields
- form fields that need to be included or excluded by
the reset action.exclude
- if true, the specified form fields are reset. If
not, all other form fields are reset.
PdfException
- if an illegal argument is supplied.PdfAction
,
PdfAction.PdfEvent
,
getDefaultValue()
,
getValue()
public void addAction(int eventType, int namedAction) throws PdfException
eventType
- constant specifying the event.namedAction
- constant specifying the named action.
PdfException
- if an illegal argument is supplied.PdfAction.PdfEvent
,
PdfAction
public void addAction(int actionType, int eventType, String javascriptOrUri) throws PdfException
actionType
- constant identifying the action as a Javascript
action or a URI action, that is, either
PdfAction.JAVASCRIPT
or
PdfAction.URI
.eventType
- constant specifying the event.javascriptOrUri
- Javascript string or URI that needs to be used used
by the action.
PdfException
- if an illegal argument is supplied.public void addAction(int actionType, int eventType, String applicationToLaunch, boolean isPrint) throws PdfException
actionType
- constant identifying the action as a launch action,
that is, PdfAction.LAUNCH
.eventType
- constant specifying the event.applicationToLaunch
- pathname of
isPrint
is
false
)isPrint
is
true
)isPrint
- whether the file needs to be printed (using its
default application).
PdfException
- if an illegal argument is supplied.PdfAction
,
PdfAction.PdfEvent
public void setParentAsNull()
TYPE_CHECKGROUP
,
TYPE_RADIOGROUP
,
PdfProDocument.addFormField(PdfFormField f, String[]
pageRanges)
public boolean isNameAsUnicode()
setNameAsUnicode(boolean)
,
setAlternateName(String)
,
setMappingName(String)
,
setName(String)
public void setNameAsUnicode(boolean isNameAsUnicode)
isNameAsUnicode
- whether all names of the form field needs to be
specified in UnicodeisNameAsUnicode()
,
getAlternateName()
,
getMappingName()
,
getName()
public PdfAppearanceStream getDownAppearance()
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
public void setDownAppearance(PdfAppearanceStream downAppearance)
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public PdfAppearanceStream getNormalAppearance()
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public void setNormalAppearance(PdfAppearanceStream normalAppearance)
normalAppearance
- the specified appearance streamPdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
,
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
public PdfAppearanceStream getRolloverAppearance()
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
rolloverAppearance
- the specified appearance streamPdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |