DynamicPDF by ceTe Software

com.cete.dynamicpdf.merger.forms
Class PdfFormField

java.lang.Object
  extended by 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)
          Creates a 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)
          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)
          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.
 Align getAlign()
          Gets the text alignment for the field.
 RgbColor getBackgroundColor()
          Gets the background color of a form field.
 DeviceColor getBorderColor()
          Gets the border color of a form field.
 BorderStyle getBorderStyle()
          Gets the BorderStyle .
 PdfFormFieldList getChildFields()
          Gets a collection of child form fields.
 boolean getComb()
           
 boolean getCombo()
           
 boolean getCommitOnSelChange()
           
 java.lang.String getDefaultValue()
          Gets the default value of the form field.
 boolean getDoNotScroll()
           
 boolean getDoNotSpellCheck()
           
 boolean getEdit()
           
 java.lang.String getExportValue()
          Gets the export value of the form field.
 boolean getFileSelect()
           
 FormFieldFlags getFlags()
          Deprecated. as of DynamicPDF v8.0.0 replace by relevant flag name properties present on this class.
 Font getFont()
          Gets the font for the field.
 float getFontSize()
          Gets the fontsize for the 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.
 boolean getMultiline()
           
 boolean getMultiSelect()
           
 java.lang.String getName()
          Gets the partial name of the form field.
 boolean getNoExport()
           
 boolean getNone()
           
 boolean getNoToggleToOff()
           
 int getOriginalPageNumber()
          Returns the original page number of the form field in the original PDF document.
protected  PdfFormField getParent()
          Gets the parent form field.
 boolean getPassword()
           
 boolean getPushbutton()
           
 boolean getRadio()
           
 boolean getRadiosInUnison()
           
 boolean getReadOnly()
           
 boolean getRequired()
           
 boolean getRichText()
           
 int getRotate()
          Gets the angle of a form field.
 boolean getSort()
           
 DeviceColor getTextColor()
          Gets the color of the text for the 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.
 void setFont(Font font)
          Sets the font for the field.
 void setFontSize(float value)
          Sets the fontsize for the 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.

getNone

public boolean getNone()
Returns:
the form field flags status of the form field

getReadOnly

public boolean getReadOnly()
Returns:
the read only flag status of the form field.

getRequired

public boolean getRequired()
Returns:
the required flag status of the form field.

getNoExport

public boolean getNoExport()
Returns:
the no export flag status of the form field.

getMultiline

public boolean getMultiline()
Returns:
the multi line flag status of the form field.

getPassword

public boolean getPassword()
Returns:
the password flag status of the form field.

getCombo

public boolean getCombo()
Returns:
the combo flag status of the form field.

getEdit

public boolean getEdit()
Returns:
the edit flag status of the form field.

getSort

public boolean getSort()
Returns:
the sort flag status of the form field.

getFileSelect

public boolean getFileSelect()
Returns:
the file select flag status of the form field.

getMultiSelect

public boolean getMultiSelect()
Returns:
the multi select flag status of the form field.

getDoNotSpellCheck

public boolean getDoNotSpellCheck()
Returns:
the do not spell check flag status of the form field.

getDoNotScroll

public boolean getDoNotScroll()
Returns:
the do not scroll flag status of the form field.

getComb

public boolean getComb()
Returns:
the comb flag status of the form field.

getNoToggleToOff

public boolean getNoToggleToOff()
Returns:
the no toggle to off flag status of the form field.

getRadio

public boolean getRadio()
Returns:
the radio flag status of the form field.

getPushbutton

public boolean getPushbutton()
Returns:
the push button flag status of the form field.

getRadiosInUnison

public boolean getRadiosInUnison()
Returns:
the radio in unison flag status of the form field.

getCommitOnSelChange

public boolean getCommitOnSelChange()
Returns:
the commit on sel change flag status of the form field.

getRichText

public boolean getRichText()
Returns:
the rich text flag status 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,
                         float xOffset,
                         float yOffset,
                         java.lang.String text)
Creates a 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.
Returns:
the created label.
See Also:
Label, Page

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

createLabel

public Label createLabel(Page page,
                         java.lang.String text)
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.
Returns:
the created label.
See Also:
Page, 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.

getDefaultValue

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

Returns:
The default value of the form field.

getValue

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

Returns:
A string containing the value.

getExportValue

public java.lang.String getExportValue()
Gets the export 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()
Deprecated. as of DynamicPDF v8.0.0 replace by relevant flag name properties present on this class.

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.

getBorderStyle

public BorderStyle getBorderStyle()
Gets the BorderStyle .

Returns:
the border style of a form field.
See Also:
BorderStyle

getBorderColor

public DeviceColor getBorderColor()
Gets the border color of a form field.

Returns:
the border color of a form field.

getBackgroundColor

public RgbColor getBackgroundColor()
Gets the background color of a form field.

Returns:
the background color of a form field.

getTextColor

public DeviceColor getTextColor()
Gets the color of the text for the field.

Returns:
the color of the text for the field.

getRotate

public int getRotate()
Gets the angle of a form field.

Returns:
the angle of a form field.

getFont

public Font getFont()
Gets the font for the field.

Returns:
the font for the field.

setFont

public void setFont(Font font)
Sets the font for the field.

Parameters:
font - the font for the field.

getFontSize

public float getFontSize()
Gets the fontsize for the field.

Returns:
the fontsize for the field.

setFontSize

public void setFontSize(float value)
Sets the fontsize for the field.

Parameters:
value - the fontsize for the field.

getAlign

public Align getAlign()
Gets the text alignment for the field.

Returns:
the text alignment for the field.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.04 for Java generated on September 25, 2019
© Copyright 2019, ceTe Software