public class TextFormFieldType
Example:
DocumentBuilder builder = new DocumentBuilder();
// Insert a text form field for input a name.
builder.insertTextInput("", TextFormFieldType.REGULAR, "", "Enter your name here", 30);
// Insert two blank lines.
builder.writeln("");
builder.writeln("");
String[] items = new String[]{"-- Select your favorite footwear --", "Sneakers", "Oxfords", "Flip-flops", "Other", "I prefer to be barefoot"};
// Insert a combo box to select a footwear type.
builder.insertComboBox("", items, 0);
// Insert two blank lines.
builder.writeln("");
builder.writeln("");
builder.getDocument().save(getArtifactsDir() + "DocumentBuilder.CreateForm.doc");
Field Summary | ||
---|---|---|
static final int | REGULAR | |
The text form field can contain any text.
|
||
static final int | NUMBER | |
The text form field can contain only numbers.
|
||
static final int | DATE | |
The text form field can contain only a valid date value.
|
||
static final int | CURRENT_DATE | |
The text form field value is the current date when the field is updated.
|
||
static final int | CURRENT_TIME | |
The text form field value is the current time when the field is updated.
|
||
static final int | CALCULATED | |
The text form field value is calculated from the expression specified in
the |
public static final int REGULAR
public static final int NUMBER
public static final int DATE
public static final int CURRENT_DATE
public static final int CURRENT_TIME
public static final int CALCULATED