com.qoppa.pdf.form
Interface FormField

All Known Subinterfaces:
CheckBoxField, ChoiceField, ComboField, ListField, PushButtonField, RadioButtonGroupField, SignatureField, TextField

public interface FormField

FormField is the abstract class that is being extended by all fields such as CheckBoxField, ChoiceField, ComboField, PushButtonField, RadioButtonGroupField, SignatureField and TextField.

Author:
Qoppa Software

Field Summary
static String TYPE_BUTTON
          This field type designates a button field.
static String TYPE_CHECKBOX
          This field type designates a check box field.
static String TYPE_COMBOBOX
          This field type designates a combo box field.
static String TYPE_LISTBOX
          This field type designates a list box field.
static String TYPE_RADIOBUTTON
          This field type designates a radio button field.
static String TYPE_SIGNATURE
          This field type designates a signature field.
static String TYPE_TEXT
          This field type designates a text field.
 
Method Summary
 void addFieldListener(FieldListener list)
          Adds a field listener to this field.
 void addKeyListener(KeyListener list)
          Adds a key listener to this field.
 void addMouseListener(MouseListener list)
          Adds a mouse listener to this field.
 void flattenField()
          Flattens the field into the document's content layer.
 String getAltFieldName()
          Returns the alternate field name for this field.
 String getFieldName()
          Returns the name of this field.
 String getFieldTypeDesc()
          Returns a description of the field type.
 String getFullFieldName()
          Returns the full name of the fields.
 Vector getKids()
          Gets a list of fields from the kids array.
 String getMapFieldName()
          Returns this field's mapping name.
 TriggerActions getTriggerActions()
          Gets the TriggerActions associated with the field.
 String getUserName()
          Gets this field's user name.
 Vector getWidgets()
          Gets a list of any widgets associated with this field.
 boolean isEmpty()
          Returns true if the field is not filled.
 boolean isNoExport()
          Returns the value of the 'No Export' flag.
 boolean isReadOnly()
          Returns the value of the 'Read Only' flag.
 boolean isRequired()
          Returns the value of the 'Required' flag.
 void removeFieldListener(FieldListener list)
          Removes a field listener from this field.
 void reset()
          Resets the field to its default value.
 void setAltFieldName(String altFieldName)
          Sets the alternate field name.
 void setComponentVisible(boolean visible)
          Sets the visibility of the component(s) associated with this field on the screen.
 void setFieldFlags(int fieldFlags)
          Sets the field flags.
 void setFieldName(String fieldName)
          Sets the field name.
 void setHidden(boolean hidden)
          Sets the HIDDEN flag.
 void setMapFieldName(String mapName)
          Sets this field's mapping name.
 void setNoExport(boolean noExport)
          Sets the 'No Export' flag.
 void setPrintable(boolean printable)
          Sets the PRINTABLE flag for this field.
 void setReadOnly(boolean readOnly)
          Sets the value of the 'Read Only' flag.
 void setRequired(boolean required)
          Sets the value of the 'Required' flag.
 void setTriggerActions(TriggerActions triggerActions)
          Sets the TriggerActions for this field.
 void setUserName(String userName)
          Sets this field's user name.
 

Field Detail

TYPE_TEXT

static final String TYPE_TEXT
This field type designates a text field.

See Also:
Constant Field Values

TYPE_COMBOBOX

static final String TYPE_COMBOBOX
This field type designates a combo box field.

See Also:
Constant Field Values

TYPE_LISTBOX

static final String TYPE_LISTBOX
This field type designates a list box field.

See Also:
Constant Field Values

TYPE_CHECKBOX

static final String TYPE_CHECKBOX
This field type designates a check box field.

See Also:
Constant Field Values

TYPE_BUTTON

static final String TYPE_BUTTON
This field type designates a button field.

See Also:
Constant Field Values

TYPE_RADIOBUTTON

static final String TYPE_RADIOBUTTON
This field type designates a radio button field.

See Also:
Constant Field Values

TYPE_SIGNATURE

static final String TYPE_SIGNATURE
This field type designates a signature field.

See Also:
Constant Field Values
Method Detail

getAltFieldName

String getAltFieldName()
Returns the alternate field name for this field.

Returns:
The alternate field name.

getFieldName

String getFieldName()
Returns the name of this field.

Returns:
The field's name.

getFieldTypeDesc

String getFieldTypeDesc()
Returns a description of the field type. "CheckBox" for CheckBoxField "ComboBox" for ComboBoxField "List" for ListField "PushButton" for PushButtonField "RadioButtonGroup" for RadioButtonGroupField "Signature" for SignatureField "TextField" for TextField

Returns:
A string describing the field type.

getFullFieldName

String getFullFieldName()
Returns the full name of the fields. If the field is hierarchical, the name will include the full path to the top parent. For instance "address.line1"

Returns:
The fully qualified field name.

getMapFieldName

String getMapFieldName()
Returns this field's mapping name.

Returns:
The field's mapping name.

getUserName

String getUserName()
Gets this field's user name.

Returns:
The field's user name.

isNoExport

boolean isNoExport()
Returns the value of the 'No Export' flag.

Returns:
Value of the 'No Export' flag.

isReadOnly

boolean isReadOnly()
Returns the value of the 'Read Only' flag.

Returns:
The value of the 'Read Only' flag.

isRequired

boolean isRequired()
Returns the value of the 'Required' flag.

Returns:
The value of the 'Required' flag.

reset

void reset()
           throws PDFException
Resets the field to its default value. If there is no default value then the value will be set to null.

Throws:
PDFException

setAltFieldName

void setAltFieldName(String altFieldName)
Sets the alternate field name.

Parameters:
altFieldName - The new alternate field name.

setFieldFlags

void setFieldFlags(int fieldFlags)
Sets the field flags. The field flags are an or'ed combination of the following values:
FF_READONLY
FF_REQUIRED
FF_NOEXPORT

Parameters:
fieldFlags - The new value for the flags.

setFieldName

void setFieldName(String fieldName)
Sets the field name.

Parameters:
fieldName - The new field name.

setMapFieldName

void setMapFieldName(String mapName)
Sets this field's mapping name.

Parameters:
mapName - The new mapping name.

setNoExport

void setNoExport(boolean noExport)
Sets the 'No Export' flag. If this flag is set, the field value will not be exported to an external file.

Parameters:
noExport - The new value of the 'No Export' flag.

setReadOnly

void setReadOnly(boolean readOnly)
Sets the value of the 'Read Only' flag. If this value is set, the fields value may not be changed.

Parameters:
readOnly - The new value of the 'Read Only' flag.

setRequired

void setRequired(boolean required)
Sets the value of the 'Required' flag. If this flag is set, the value in this field is a required value.

Parameters:
required - The new value of the 'Required' flag.

setUserName

void setUserName(String userName)
Sets this field's user name.

Parameters:
userName - The new user name.

setPrintable

void setPrintable(boolean printable)
Sets the PRINTABLE flag for this field. A hidden field will not be displayed on the screen and will not print.

Parameters:
printable - the new invisible setting.

setHidden

void setHidden(boolean hidden)
Sets the HIDDEN flag. A hidden field will not be displayed on the screen and will not print.

Parameters:
hidden - the new hidden setting. True to hide, false to show the field.

setComponentVisible

void setComponentVisible(boolean visible)
Sets the visibility of the component(s) associated with this field on the screen. This method should be used when component visibility needs to be changed temporarily on the screen. To hide the field definitively, use the setHidden method that will set the hidden flag in the document.

Parameters:
visible - The new value of the components visibility.

getWidgets

Vector getWidgets()
Gets a list of any widgets associated with this field. A field can have several widgets (components) that display or interact with its values, so the return value for this method is a Vector. The objects in the Vector are all derived from com.qoppa.pdf.annotations.Widget Note that these widgets are not accessible from jPDFViewerBean.

Returns:
List of widgets for this field.

addFieldListener

void addFieldListener(FieldListener list)
Adds a field listener to this field.

Parameters:
list - An object that implements FieldListener.

addMouseListener

void addMouseListener(MouseListener list)
Adds a mouse listener to this field. This will add a mouse listener to all the field's widgets but not to the widget's editing component. This means that events will not be generated when the field is in edit mode.

Parameters:
list - An object that implements MouseListener.

addKeyListener

void addKeyListener(KeyListener list)
Adds a key listener to this field. This will add a key listener to all the field's widgets but not to the widget's editing component. This means that events will not be generated when the field is in edit mode.

Parameters:
list - An object that implements KeyListener

removeFieldListener

void removeFieldListener(FieldListener list)
Removes a field listener from this field.

Parameters:
list - The listener to remove.

flattenField

void flattenField()
                  throws PDFException
Flattens the field into the document's content layer. This method only works when the document is a mutable document, such as within the jPDFNotes or jPDFProcess libraries.

Throws:
PDFException

getKids

Vector getKids()
Gets a list of fields from the kids array.

Returns:
List of child fields.

getTriggerActions

TriggerActions getTriggerActions()
Gets the TriggerActions associated with the field.

Returns:
TriggerActions

setTriggerActions

void setTriggerActions(TriggerActions triggerActions)
Sets the TriggerActions for this field.


isEmpty

boolean isEmpty()
Returns true if the field is not filled. Some fields cannot be empty (Checkboxes, Signatures, Lists, Buttons) and will always return false