Class Index

Classes


Class Annotations.Forms.Field


Extends Actions.Dispatcher.
Annotations.Forms.Field

Class Summary
Constructor Attributes Constructor Name and Description
 
Annotations.Forms.Field(name, options)
Represents a PDF Form field.
Field Summary
Field Attributes Field Name and Description
 
Gets the field's actions.
 
The field's children
 
The field's default value
 
The field's export value.
 
The field's flags object
 
Returns the field's associated font object
 
Is field is modified?
 
The field's maximum length.
 
The full name of the field.
 
The field's options (or permanently null if the field type does not support options).
 
Returns the field's quadding.
 
Returns the field's type.
 
The field's value.
 
The field's child widgets
Method Summary
Method Attributes Method Name and Description
 
commit(event, value, widget)
Commits the new value to the field (triggers Validate action, and updates all widgets)
 
Is this a terminal field? Currently, this checks for field children.
 
set(options)
Set all field properties form the given object.
 
setType(type)
Sets the field's type.
 
setValue(value, widget)
Sets the field's value, following any type-specific constraints, and updating all widgets.
 
setVisible(visible)
Sets the visibility of all child widgets
Methods borrowed from class Actions.Dispatcher:
addAction, addActions, addActionsFromXfdf, getActions, getDocumentViewer, saveActionsToXfdf, setDocumentViewer, triggerAction
Event Summary
Event Attributes Event Name and Description
 
calculate(source)
A signal that the field should fire its own calculation events.
 
change(field)
An event that represents a field's value having changed.
 
commit(value)
The field's value has been changed by the user.
Class Detail
Annotations.Forms.Field(name, options)
Represents a PDF Form field.
Parameters:
{!string} name
The field's full name
{?(Annotations.Forms.Field|object)} options
The options with which to construct the field. If options is a Field, the constructor returns the existing object.
Field Detail
{Object.>} actions
Gets the field's actions.
Default Value:
{}

{Annotations.Forms.Field[]} children
The field's children
Default Value:
[]

{?(number|string)} defaultValue
The field's default value
Default Value:
null

{?(number|string)} exportValue
The field's export value. Defaults to the field's value if not set.
Default Value:
null

{Annotations.WidgetFlags} flags
The field's flags object
Default Value:
new Annotations.WidgetFlags()

{Annotations.Font} font
Returns the field's associated font object
Default Value:
new Annotations.Font()

{boolean} IsModified
Is field is modified?
Default Value:
false

{number} maxLen
The field's maximum length. -1 means infinite.
Default Value:
-1

{string} name
The full name of the field.

{({value: string|displayValue: string}[]|null)} options
The field's options (or permanently null if the field type does not support options).
Default Value:
[]

{string} quadding
Returns the field's quadding. (One of 'Left-justified', 'Right-justified', 'Centered')
Default Value:
'Left-justified'

{string} type
Returns the field's type. One of ('Tx', 'Btn', 'Ch' or 'Sig')

{?(number|string)} value
The field's value.
Default Value:
null

{Annotations.WidgetAnnotation[]} widgets
The field's child widgets
Default Value:
[]
Method Detail
commit(event, value, widget)
Commits the new value to the field (triggers Validate action, and updates all widgets)
Parameters:
{*} event
Ignored.
{?(string|number)} value
The new value.
widget

{boolean} isTerminal()
Is this a terminal field? Currently, this checks for field children.
Returns:
{boolean} Whether this field is terminal

set(options)
Set all field properties form the given object.
Parameters:
{(Annotations.Forms.Field|object)} options
The object to set properties from.

setType(type)
Sets the field's type. Tries to retain as much type-specific information as possible across type changes.
Parameters:
{string} type
The new field type, one of Tx, Ch, Btn or Sig.

setValue(value, widget)
Sets the field's value, following any type-specific constraints, and updating all widgets.
Parameters:
{?(string|number)} value
The value to set.
widget

setVisible(visible)
Sets the visibility of all child widgets
Parameters:
{boolean} visible
Should the field be visible?
Event Detail
calculate(source)
A signal that the field should fire its own calculation events.
Parameters:
{Annotations.Forms.Field} source
The field that caused the calculation event.

change(field)
An event that represents a field's value having changed.
Parameters:
{Annotations.Forms.Field} field
The field that has changed.

commit(value)
The field's value has been changed by the user. Sets a new value.
Parameters:
{?(string|number)} value
The new field value.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:35 GMT-0700 (PDT)