DynamicPDF by ceTe Software

com.cete.dynamicpdf.merger.forms
Class PdfFormField

java.lang.Object
  |
  +--com.cete.dynamicpdf.merger.forms.PdfFormField
Direct Known Subclasses:
PdfButtonField, PdfChoiceField, PdfSignatureField, PdfTextField

public class PdfFormField
extends java.lang.Object

Representing a form field in a PDF document.

Licensing:
This class is a DynamicPDF Merger Standard Edition feature. One of the following licenses is required for non-evaluation usage:


Method Summary
 Label createLabel(Page page, float xOffset, float yOffset, java.lang.String text, Font font, float fontSize)
          Creates a Label object and adds it to the given page at the coordinates of the form field.
 Label createLabel(Page page, float xOffset, float yOffset, java.lang.String text, Font font, float fontSize, TextAlign align)
          Creates a Label object and adds it to the given page at the coordinates of the form field.
 Label createLabel(Page page, float xOffset, float yOffset, java.lang.String text, Font font, float fontSize, TextAlign align, Color textColor)
          Creates a Label object and adds it to the given page at the coordinates of the form field.
 Label createLabel(Page page, java.lang.String text, Font font, float fontSize)
          Creates a Label object and adds it to the given page at the coordinates of the form field.
 Label createLabel(Page page, java.lang.String text, Font font, float fontSize, TextAlign align)
          Creates a Label object and adds it to the given page at the coordinates of the form field.
 Label createLabel(Page page, java.lang.String text, Font font, float fontSize, TextAlign align, Color textColor)
          Creates a Label object and adds it to the given page at the coordinates of the form field.
 PdfFormFieldList getChildFields()
          Gets a collection of child form fields.
 FormFieldFlags getFlags()
          Gets the partial name of the form field.
protected  PdfForm getForm()
          Gets the form the form field belongs to.
 java.lang.String getFullName()
          Gets the full name of the form field.
 float getHeight()
          Gets the height of the form field.
 java.lang.String getName()
          Gets the partial name of the form field.
 int getOriginalPageNumber()
          Returns the original page number of the form field in the original PDF document.
protected  PdfFormField getParent()
          Gets the parent form field.
 java.lang.String getValue()
          Gets the value of the form field.
 float getWidth()
          Gets the width of the form field.
 float getX(Page page)
          Returns the X coordinate of the form field on the given page.
 float getY(Page page)
          Returns the Y coordinate of the form field on the given page.
 boolean hasChildFields()
          Gets the type of the form field.
 void positionPageElement(PageElement pageElement, Page page)
          Sets the position of a page element to the coordinates of the form field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasChildFields

public boolean hasChildFields()
Gets the type of the form field.

Returns:
The type of the form field.

getOriginalPageNumber

public int getOriginalPageNumber()
Returns the original page number of the form field in the original PDF document.

Returns:
The page number that the form field appears on (1 based index).

positionPageElement

public void positionPageElement(PageElement pageElement,
                                Page page)
Sets the position of a page element to the coordinates of the form field.

Parameters:
pageElement - Page element whose coordinates should be set.
page - Page that contains the page element.
See Also:
PageElement, Page

getX

public float getX(Page page)
Returns the X coordinate of the form field on the given page.

Parameters:
page - Page for which the X coordinates are returned.
Returns:
The X coordinate on the given page.
See Also:
Page

getY

public float getY(Page page)
Returns the Y coordinate of the form field on the given page.

Parameters:
page - Page for which the Y coordinates are returned.
Returns:
The Y coordinate on the given page.
See Also:
Page

createLabel

public Label createLabel(Page page,
                         float xOffset,
                         float yOffset,
                         java.lang.String text,
                         Font font,
                         float fontSize)
Creates a Label object and adds it to the given page at the coordinates of the form field.

Parameters:
page - Page to which the label will be added.
xOffset - The X coordinate offset for the label.
yOffset - The Y coordinate offset for the label.
text - The text of the label.
font - The font to use for the label.
fontSize - The font size to use for the label.
Returns:
The Label object that was added to the page.
See Also:
Page, Font, Label

createLabel

public Label createLabel(Page page,
                         float xOffset,
                         float yOffset,
                         java.lang.String text,
                         Font font,
                         float fontSize,
                         TextAlign align)
Creates a Label object and adds it to the given page at the coordinates of the form field.

Parameters:
page - Page to which the label will be added.
xOffset - The X coordinate offset for the label.
yOffset - The Y coordinate offset for the label.
text - The text of the label.
font - The font to use for the label.
fontSize - The font size to use for the label.
align - The text alignment of the label.
Returns:
The Label object that was added to the page.
See Also:
Page, Font, TextAlign, Label

createLabel

public Label createLabel(Page page,
                         float xOffset,
                         float yOffset,
                         java.lang.String text,
                         Font font,
                         float fontSize,
                         TextAlign align,
                         Color textColor)
Creates a Label object and adds it to the given page at the coordinates of the form field.

Parameters:
page - Page to which the label will be added.
xOffset - The X coordinate offset for the label.
yOffset - The Y coordinate offset for the label.
text - The text of the label.
font - The font to use for the label.
fontSize - The font size to use for the label.
align - The text alignment of the label.
textColor - The text color of the label.
Returns:
The Label object that was added to the page.
See Also:
Page, Font, TextAlign, Color, Label

createLabel

public Label createLabel(Page page,
                         java.lang.String text,
                         Font font,
                         float fontSize)
Creates a Label object and adds it to the given page at the coordinates of the form field.

Parameters:
page - Page to which the label will be added.
text - The text of the label.
font - The font to use for the label.
fontSize - The font size to use for the label.
Returns:
The Label object that was added to the page.
See Also:
Page, Font, Label

createLabel

public Label createLabel(Page page,
                         java.lang.String text,
                         Font font,
                         float fontSize,
                         TextAlign align)
Creates a Label object and adds it to the given page at the coordinates of the form field.

Parameters:
page - Page to which the label will be added.
text - The text of the label.
font - The font to use for the label.
fontSize - The font size to use for the label.
align - The text alignment of the label.
Returns:
The Label object that was added to the page.
See Also:
Page, Font, TextAlign, Label

createLabel

public Label createLabel(Page page,
                         java.lang.String text,
                         Font font,
                         float fontSize,
                         TextAlign align,
                         Color textColor)
Creates a Label object and adds it to the given page at the coordinates of the form field.

Parameters:
page - Page to which the label will be added.
text - The text of the label.
font - The font to use for the label.
fontSize - The font size to use for the label.
align - The text alignment of the label.
textColor - The text color of the label.
Returns:
The Label object that was added to the page.
See Also:
Page, Font, TextAlign, Color, Label

getWidth

public float getWidth()
Gets the width of the form field.

Returns:
The width of the form field.

getHeight

public float getHeight()
Gets the height of the form field.

Returns:
The height of the form field.

getParent

protected PdfFormField getParent()
Gets the parent form field.

Returns:
The parent form field.

getForm

protected PdfForm getForm()
Gets the form the form field belongs to.

Returns:
The form the form field belongs to.

getValue

public java.lang.String getValue()
Gets the value of the form field.

Returns:
A string containing the value.

getChildFields

public PdfFormFieldList getChildFields()
Gets a collection of child form fields.

Returns:
A collection of child form fields.

getFlags

public FormFieldFlags getFlags()
Gets the partial name of the form field.

Returns:
The partial name of the form field.

getName

public java.lang.String getName()
Gets the partial name of the form field.

Returns:
The partial name of the form field.

getFullName

public java.lang.String getFullName()
Gets the full name of the form field.

Returns:
The full name of the form field.

DynamicPDF by ceTe Software

API Reference for DynamicPDFTM v4.0.1 for Java generated on October 06, 2006
© Copyright 2006, ceTe Software