public class PDFFormControl extends Widget
PDFFormControl
represents the PDF FormControl.
It offers almost the common properties get/set method for form control.
Before call all methods in this package, please note to call
at first.PDFDocument.loadForm()
PDFDocument
Widget.AnnotIconFit
Annot.Border, Annot.QuadpointsF
BORDERSTYLE_BEVELED, BORDERSTYLE_CLOUDY, BORDERSTYLE_DASHED, BORDERSTYLE_INSET, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_LOCKED, FLAG_LOCKEDCONTENTS, FLAG_NOROTATE, FLAG_NOVIEW, FLAG_NOZOOM, FLAG_PRINT, FLAG_READONLY, FLAG_TOGGLENOVIEW, HIGHLIGHTINGMODE_INVERT, HIGHLIGHTINGMODE_NONE, HIGHLIGHTINGMODE_OUTLINE, HIGHLIGHTINGMODE_PUSH, HIGHLIGHTINGMODE_TOGGLE, MKENTRY_BACKGROUNDCOLOR, MKENTRY_BORDERCOLOR, MKENTRY_DOWNCAPTION, MKENTRY_DOWNICON, MKENTRY_ICONFIT, MKENTRY_NORMALCAPTION, MKENTRY_NORMALICON, MKENTRY_ROLLOVERCAPTION, MKENTRY_ROLLOVERICON, MKENTRY_ROTATION, MKENTRY_TEXTPOSITION, TRIGGER_ANNOT_CE, TRIGGER_ANNOT_CX, TRIGGER_ANNOT_FL, TRIGGER_ANNOT_FO, TRIGGER_ANNOT_MD, TRIGGER_ANNOT_MU, TRIGGER_ANNOT_PC, TRIGGER_ANNOT_PI, TRIGGER_ANNOT_PO, TRIGGER_ANNOT_PV, TYPE_3D, TYPE_CARET, TYPE_CIRCLE, TYPE_FILEATTACHMENT, TYPE_FREETEXT, TYPE_HIGHLIGHT, TYPE_INK, TYPE_LINE, TYPE_LINK, TYPE_MOVIE, TYPE_POLYGON, TYPE_POLYLINE, TYPE_POPUP, TYPE_PRINTERMARK, TYPE_PSI, TYPE_SCREEN, TYPE_SOUND, TYPE_SQUARE, TYPE_SQUIGGLY, TYPE_STAMP, TYPE_STRIKEOUT, TYPE_TEXT, TYPE_TRAPNET, TYPE_UNDERLINE, TYPE_WATERMARK, TYPE_WIDGET
Modifier and Type | Method and Description |
---|---|
boolean |
doJavaScriptAction(int trigger)
Perform the form control javascript which is specified by the trigger.
|
java.lang.String |
getExportValue()
Get option's export value.
|
java.lang.String |
getFieldName()
Get field name from
PDFFormControl handle. |
long |
getHandle()
Get the
PDFFormControl handle. |
int |
getIndex()
Get index of the form control which belongs to the specified fields.
|
Widget |
getWidgetAnnot()
Get widget annotation from form control handle.
|
boolean |
isChecked()
Get check box or radio button's state.
|
boolean |
isDefaultChecked()
Get check box or radio button's default state.
|
void |
setChecked(boolean checked)
Set check box or radio button's state.
|
void |
setDefaultChecked(boolean defaultChecked)
Set check box or radio button's default state.
|
void |
setExportValue(java.lang.String exportValue)
Set option's export value.
|
countActions, getAction, getHighlightingMode, getIconFit, getMKCaption, getMKColor, getMKIconBitmap, getMKRotation, hasMKEntry, insertAction, removeAction, removeAllActions, removeMKEntry, resetAppearance, setAction, setHighLightingMode, setIconFit, setMKCaption, setMKColor, setMKIconImage, setMKRotation
getBorder, getBorderColor, getContents, getDeviceRect, getFlags, getIndex, getModifiedDateTime, getName, getRect, getType, isMarkup, move, setBorder, setBorderColor, setContents, setFlags, setIconProvider, setModifiedDateTime, setName
public long getHandle()
PDFFormControl
handle.public Widget getWidgetAnnot()
Widget
object.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
Widget
public java.lang.String getFieldName() throws PDFException
PDFFormControl
handle.String
object that receives value of field name.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public java.lang.String getExportValue() throws PDFException
String
object that receives value of option's
export value.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public boolean isChecked() throws PDFException
boolean
value that receives the button's state.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public boolean isDefaultChecked() throws PDFException
boolean
value that receives the button default
state.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setExportValue(java.lang.String exportValue) throws PDFException
exportValue
- A String
object that sets the option's export value.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setChecked(boolean checked) throws PDFException
checked
- A boolean
value that is the check box or radio
button's state.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setDefaultChecked(boolean defaultChecked) throws PDFException
defaultChecked
- A boolean
value that is the check box or radio
button's default state.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public boolean doJavaScriptAction(int trigger) throws PDFException
trigger
- An int
value that to be set to the trigger event.
Please refer to constant definitions
TRIGGER_ANNOT_XXX
and this should be one of these constants.true
if do the javascript action successfully, else
return false
for failure.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public int getIndex() throws PDFException
PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
PDFFormControl