DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements.forms
Class TextField

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.TaggablePageElement
          extended by com.cete.dynamicpdf.pageelements.forms.FormElement
              extended by com.cete.dynamicpdf.pageelements.forms.TextField

public class TextField
extends FormElement

Represents the text field of a interactive forms.

Text fields are boxes or spaces in which the user can enter text from the keyboard.

NOTE: This page element cannot be used within a table cell, or tranformation group.

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

View Example


Constructor Summary
TextField(java.lang.String name, float x, float y, float width, float height)
          Creates a new instance of TextField class.
 
Method Summary
 void draw(PageWriter writer)
          Draws the text field to the given PageWriter object.
 java.lang.String getDefaultValue()
          Gets the text field's default value.
 Font getFont()
          Gets the font of the field.
 float getFontSize()
          Gets the font size of the field.
 int getMaxLength()
          Gets the maximum length of characters in a text field.
 boolean isMultiLine()
          Gets the text field multiline status.
 boolean isNoExport()
          Gets the export state for the field.
 boolean isPassword()
          Gets the text field password flag status.
 boolean isRequired()
          Gets the value specifying the required state of the field.
 void setAlign(Align align)
          Sets the text align.
 void setDefaultValue(java.lang.String defaultValue)
          Sets the text field's default value.
 void setFont(Font font)
          Sets the font for the field.
 void setFontSize(float fontSize)
          Sets the font size for the field.
 void setMaxLength(int length)
          Sets the maximum length of characters in a text field.
 void setMultiLine(boolean value)
          Sets the text field to contain multiple lines.
 void setNoExport(boolean value)
          Sets the export state for the field.
 void setPassword(boolean value)
          Sets the text field intended for entering a secure password that should not be echoed visibly to the screen.
 void setRequired(boolean value)
          Sets the required state for the field.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.forms.FormElement
getBackgroundColor, getBorderColor, getBorderStyle, getHeight, getMappingName, getName, getOutput, getReaderEvents, getRotate, getTextColor, getToolTip, getWidth, getX, getY, isPrintable, isReadOnly, isVisible, setBackgroundColor, setBorderColor, setBorderStyle, setHeight, setMappingName, setName, setOutput, setPrintable, setReadOnly, setRotate, setTag, setTextColor, setToolTip, setVisible, setWidth, setX, setY
 
Methods inherited from class com.cete.dynamicpdf.pageelements.TaggablePageElement
getTag, getTagOrder, setTagOrder
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextField

public TextField(java.lang.String name,
                 float x,
                 float y,
                 float width,
                 float height)
Creates a new instance of TextField class.

Parameters:
name - Name of a text field.
x - X coordinate of a text field.
y - Y coordinate of a text field.
width - Width of a text field.
height - Height of a text field.
Method Detail

setFont

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

Parameters:
font - the font for the field.

getFont

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

Returns:
the font of the field.

setFontSize

public void setFontSize(float fontSize)
Sets the font size for the field.

Parameters:
fontSize - the font size for the field.

getFontSize

public float getFontSize()
Gets the font size of the field.

Returns:
the font size for the field.

getDefaultValue

public java.lang.String getDefaultValue()
Gets the text field's default value.

Returns:
the text field's default value.

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Sets the text field's default value.

Parameters:
defaultValue - the text field's default value.

getMaxLength

public int getMaxLength()
Gets the maximum length of characters in a text field.

Returns:
the maximum length of characters in a text field.

setMaxLength

public void setMaxLength(int length)
Sets the maximum length of characters in a text field.

Parameters:
length - the maximum length of characters in a text field.

setAlign

public void setAlign(Align align)
Sets the text align.


setPassword

public void setPassword(boolean value)
Sets the text field intended for entering a secure password that should not be echoed visibly to the screen.

Parameters:
value - password of the field.

isPassword

public boolean isPassword()
Gets the text field password flag status.

Returns:
the text field password flag status.

setMultiLine

public void setMultiLine(boolean value)
Sets the text field to contain multiple lines.

If set, the field may contain multiple lines of text; if clear, the field�s text is restricted to a single line.

Parameters:
value - the multi line property of the field.

isMultiLine

public boolean isMultiLine()
Gets the text field multiline status.

Returns:
the multi line property of the field

isRequired

public boolean isRequired()
Gets the value specifying the required state of the field.

Returns:
the required state of the field.

setRequired

public void setRequired(boolean value)
Sets the required state for the field.

If set, the field must have a value at the time it is exported by a submit-form action.

Parameters:
value - the required state for the field.

isNoExport

public boolean isNoExport()
Gets the export state for the field.

Returns:
the export state for the field.

setNoExport

public void setNoExport(boolean value)
Sets the export state for the field.

If set, the field will not be exported by a submit-form action.

Parameters:
value - the export state for the field.

draw

public void draw(PageWriter writer)
Draws the text field to the given PageWriter object.

Overrides:
draw in class TaggablePageElement
Throws:
GeneratorException - If Form Field with the same name already exist.
Parameters:
writer - PageWriter object to receive the text field's output.
See Also:
PageWriter

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software