com.lowagie.text.pdf
public class TextField extends BaseField
Field Summary | |
---|---|
String[] | choiceExports Holds value of property choiceExports. |
String[] | choices Holds value of property choices. |
int | choiceSelection Holds value of property choiceSelection. |
String | defaultText Holds value of property defaultText. |
BaseFont | extensionFont
Holds value of property extensionFont. |
float | extraMarginLeft |
float | extraMarginTop |
ArrayList | substitutionFonts
Holds value of property substitutionFonts. |
int | topFirst |
Constructor Summary | |
---|---|
TextField(PdfWriter writer, Rectangle box, String fieldName) Creates a new TextField . |
Method Summary | |
---|---|
static void | changeFontSize(Phrase p, float size) |
static boolean | checkRTL(String text) |
Phrase | composePhrase(String text, BaseFont ufont, Color color, float fontSize) |
PdfAppearance | getAppearance() |
String[] | getChoiceExports() Gets the export values in list/combo fields. |
protected PdfFormField | getChoiceField(boolean isList) |
String[] | getChoices() Gets the choices to be presented to the user in list/combo
fields. |
int | getChoiceSelection() Gets the zero based index of the selected item. |
PdfFormField | getComboField() Gets a new combo field. |
String | getDefaultText() Gets the default text. |
BaseFont | getExtensionFont()
Gets the extensionFont. |
PdfAppearance | getListAppearance() |
PdfFormField | getListField() Gets a new list field. |
ArrayList | getSubstitutionFonts()
Gets the list of substitution fonts. |
PdfFormField | getTextField() Gets a new text field. |
int | getTopFirst() |
static String | removeCRLF(String text) |
void | setChoiceExports(String[] choiceExports) Sets the export values in list/combo fields. |
void | setChoices(String[] choices) Sets the choices to be presented to the user in list/combo
fields. |
void | setChoiceSelection(int choiceSelection) Sets the zero based index of the selected item. |
void | setDefaultText(String defaultText) Sets the default text. |
void | setExtensionFont(BaseFont extensionFont)
Sets the extensionFont. |
void | setExtraMargin(float extraMarginLeft, float extraMarginTop)
Sets extra margins in text fields to better mimic the Acrobat layout. |
void | setSubstitutionFonts(ArrayList substitutionFonts)
Sets a list of substitution fonts. |
TextField
.Parameters: writer the document PdfWriter
box the field location and dimensions fieldName the field name. If null
only the widget keys
will be included in the field allowing it to be used as a kid field.
Returns: the export values in list/combo fields
Returns: the choices to be presented to the user
Returns: the zero based index of the selected item
Returns: a new combo field
Throws: IOException on error DocumentException on error
Returns: the default text
null
.Returns: the extensionFont
Returns: a new list field
Throws: IOException on error DocumentException on error
BaseFont
and can be null
. The fonts in this list will be used if the original
font doesn't contain the needed glyphs.Returns: the list
Returns: a new text field
Throws: IOException on error DocumentException on error
null
then the choice values will also be used
as the export values.Parameters: choiceExports the export values in list/combo fields
Parameters: choices the choices to be presented to the user
Parameters: choiceSelection the zero based index of the selected item
Parameters: defaultText the default text
null
.Parameters: extensionFont New value of property extensionFont.
Parameters: extraMarginLeft the extra margin left extraMarginTop the extra margin top
BaseFont
and can also be null
. The fonts in this list will be used if the original
font doesn't contain the needed glyphs.Parameters: substitutionFonts the list