public class FieldBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CHECKBOX_CHECKED |
static int |
DEFAULT_HEIGHT |
static FieldStyle |
DEFAULT_STYLE |
static int |
DEFAULT_WIDTH |
static String |
RADIO_SELECTED |
static String |
SELECTED_VALUE |
| Constructor and Description |
|---|
FieldBuilder() |
| Modifier and Type | Method and Description |
|---|---|
FieldBuilder |
atPosition(double x,
double y)
Sets the field at the position in pixel relative to the original document, specified by x and y coordinates
|
Field |
build()
Builds the actual Field with the values specified.
|
static FieldBuilder |
checkBox()
Creates a field builder having set the style to UNBOUND_CHECK_BOX.
|
static FieldBuilder |
customField(String name)
Creates a field builder having set the style to UNBOUND_CUSTOM_FIELD
It defines a user defined form field that may be stamped on the document.
|
static FieldBuilder |
datepicker()
Creates a field builder having set the style to DATEPICKER.
|
static FieldBuilder |
dropList()
Creates a field builder having set the style to DROP_LIST.
|
static FieldBuilder |
label()
Every bound field (Date, Title, Name) is a label.
|
static FieldBuilder |
newField()
Creates a field builder
|
FieldBuilder |
onPage(int pageNumber)
Sets the page on which the field is located.
|
static FieldBuilder |
qrCode()
Creates a field builder having set the style to BOUND_QRCODE.
|
static FieldBuilder |
radioButton(String group)
Creates a field builder having set the style to UNBOUND_RADIO_BUTTON.
|
static FieldBuilder |
signatureDate()
Creates a field builder having set the style to BOUND_DATE.
|
static FieldBuilder |
signerCompany()
Creates a field builder having set the style to BOUND_COMPANY.
|
static FieldBuilder |
signerName()
Creates a filed builder having set the style to BOUND_NAME.
|
static FieldBuilder |
signerTitle()
Creates a field builder having set the style to BOUND_TITLE.
|
static FieldBuilder |
textArea()
Creates a field builder having set the style to TEXT_AREA.
|
static FieldBuilder |
textField()
Creates a field builder having set the style to UNBOUND_TEXT_FIELD.
|
FieldBuilder |
withFontSize(Integer fontSize)
Set a field's fontSize.
|
FieldBuilder |
withId(FieldId fieldId)
Set a field's unique ID.
|
FieldBuilder |
withName(String name)
Sets the name of the field.
|
FieldBuilder |
withPositionAnchor(TextAnchor textAnchor)
Informs the eSignLive document engine that the position of the field
must be defined relative to the position of a certain text string on the document.
|
FieldBuilder |
withPositionAnchor(TextAnchorBuilder builder)
Informs the eSignLive document engine that the position of the field
must be defined relative to the position of a certain text string on the document.
|
FieldBuilder |
withPositionExtracted()
Informs the eSignLive document engine that the position of the field
must be inferred from the position of an acrobat form field with a
specified name (@see #withName(String)).
|
FieldBuilder |
withSize(double width,
double height)
Sets the size, in pixel, of the field
|
FieldBuilder |
withStyle(FieldStyle style)
Sets the style of the field
|
FieldBuilder |
withTooltip(String tooltip)
Set a field's tooltip.
|
FieldBuilder |
withValidation(FieldValidator fieldValidator)
Sets a validator on the field.
|
FieldBuilder |
withValidation(FieldValidatorBuilder builder)
Sets a validator on the field that could be easily customized by the field validator builder provided as parameter.
|
FieldBuilder |
withValue(boolean value)
Set a field's value for a radio button or a checkbox
|
FieldBuilder |
withValue(String value)
Set a field's value.
|
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static final FieldStyle DEFAULT_STYLE
public static final String SELECTED_VALUE
public static final String CHECKBOX_CHECKED
public static final String RADIO_SELECTED
public static FieldBuilder newField()
public static FieldBuilder signatureDate()
FieldStylepublic static FieldBuilder signerName()
FieldStylepublic static FieldBuilder signerTitle()
FieldStylepublic static FieldBuilder signerCompany()
FieldStylepublic static FieldBuilder textField()
FieldStylepublic static FieldBuilder customField(String name)
E.g.: user's pharmacist license number.
FieldStylepublic static FieldBuilder checkBox()
FieldStylepublic static FieldBuilder radioButton(String group)
group - the radio button groupFieldStylepublic static FieldBuilder dropList()
FieldStylepublic static FieldBuilder textArea()
FieldStylepublic static FieldBuilder label()
FieldStylepublic static FieldBuilder datepicker()
FieldStylepublic static FieldBuilder qrCode()
FieldStylepublic FieldBuilder onPage(int pageNumber)
pageNumber - the page numberpublic FieldBuilder atPosition(double x, double y)
x - the x coordinate of the top-left corner @min="0"y - the y coordinate of the top-left corner @min="0"public FieldBuilder withSize(double width, double height)
width - the width of the field @min="0"height - the height of the field @min="0"public FieldBuilder withStyle(FieldStyle style)
style - the style of the fieldFieldStylepublic FieldBuilder withName(String name)
name - the name of the field @size(max="255")public FieldBuilder withPositionExtracted()
When using withPositionExtracted() you must not use
withSize(double, double) and atPosition(double, double).
public FieldBuilder withPositionAnchor(TextAnchorBuilder builder)
When using withPositionAnchor(TextAnchorBuilder) you must not use
withSize(double, double).
builder - public FieldBuilder withPositionAnchor(TextAnchor textAnchor)
When using withPositionAnchor(TextAnchorBuilder) you must not use
withSize(double, double).
textAnchor - withPositionAnchor(TextAnchorBuilder)public FieldBuilder withValidation(FieldValidator fieldValidator)
fieldValidator - the field validatorpublic FieldBuilder withValidation(FieldValidatorBuilder builder)
builder - the field validator builderpublic FieldBuilder withValue(boolean value)
value - true for checked and false for uncheckedpublic FieldBuilder withValue(String value)
value - String value of the field @size(max="255")public FieldBuilder withFontSize(Integer fontSize)
fontSize - Integer fontSize of the field)public FieldBuilder withTooltip(String tooltip)
tooltip - String tooltip of the field)public FieldBuilder withId(FieldId fieldId)
fieldId - public Field build()
Copyright 2022 OneSpan All rights reserved.