com.qoppa.pdf.form
Interface TextField

All Superinterfaces:
FormField

public interface TextField
extends FormField

TextField holds a text field.

Author:
Qoppa Software

Method Summary
 String getDefaultValue()
          Returns the default value for this text field.
 int getHorzTextAlign()
          Returns the horizontal text alignment property for this field.
 int getMaxLength()
          Returns the maximum number of characters allowed for this text field.
 String getValue()
          Returns the value of the text field.
 boolean isMultiLine()
          Returns true if the 'Multi-Line' flag is on for this text field.
 void setDefaultValue(String defaultValue)
          Sets the default value for this text field.
 void setHorzTextAlign(int justify)
          Sets the text alignment for this field.
 void setMaxLen(int maxLen)
          Sets the maximum number of characters allowed in this text field.
 void setValue(String value)
          Sets the value for this text field.
 
Methods inherited from interface com.qoppa.pdf.form.FormField
addFieldListener, addKeyListener, addMouseListener, flattenField, getAltFieldName, getFieldName, getFieldTypeDesc, getFullFieldName, getMapFieldName, getUserName, getWidgets, isNoExport, isReadOnly, isRequired, removeFieldListener, reset, setAltFieldName, setComponentVisible, setFieldFlags, setFieldName, setHidden, setMapFieldName, setNoExport, setPrintable, setReadOnly, setRequired, setUserName
 

Method Detail

getDefaultValue

public String getDefaultValue()
Returns the default value for this text field.

Returns:
The default value of the field

getMaxLength

public int getMaxLength()
Returns the maximum number of characters allowed for this text field.

Returns:
the max length

getValue

public String getValue()
Returns the value of the text field.

Returns:
The value of the field

isMultiLine

public boolean isMultiLine()
Returns true if the 'Multi-Line' flag is on for this text field. Returns false if the flag is off. The 'Multi-Line' flag controls wether users are allowed to type-in multi lines in the field.

Returns:
true or false

setValue

public void setValue(String value)
              throws PDFException
Sets the value for this text field.

Throws:
PDFException

setDefaultValue

public void setDefaultValue(String defaultValue)
Sets the default value for this text field.


setMaxLen

public void setMaxLen(int maxLen)
Sets the maximum number of characters allowed in this text field.


setHorzTextAlign

public void setHorzTextAlign(int justify)
                      throws PDFException
Sets the text alignment for this field. The possible values are SwingConstants.LEFT, SwingConstants.CENTER and SwingConstants.RIGHT.

Parameters:
justify - The new value for the text alignment
Throws:
PDFException

getHorzTextAlign

public int getHorzTextAlign()
Returns the horizontal text alignment property for this field. The possible return values are SwingConstants.LEFT, SwingConstants.CENTER and SwingConstants.RIGHT.

Returns:
The value of the horizontal text alignment property.