public final class TemplateFieldPosition extends Object
Provides a template field position.
Modifier and Type | Method and Description |
---|---|
boolean |
canScaleSearchAreaSize() |
static TemplateFieldPosition |
createFixed(Rectangle rectangle)
Creates a fixed template field position.
|
static TemplateFieldPosition |
createRegex(String regex)
Creates a regex template field position.
|
static TemplateFieldPosition |
createRelated(String relatedFieldName,
int relatedPositionType,
Size searchAreaSize)
Creates a related template field position.
|
static TemplateFieldPosition |
createRelated(String relatedFieldName,
int relatedPositionType,
Size searchAreaSize,
boolean canScaleSearchAreaSize)
Creates a related template field position.
|
Rectangle |
getRectangle()
Gets a rectangle of the field.
|
String |
getRegex()
Gets a regular expression.
|
String |
getRelatedFieldName()
Gets a name of the related field.
|
int |
getRelatedPositionType()
Gets a field position relative to the related field.
|
Size |
getSearchAreaSize()
Gets a size of the field.
|
int |
getType()
Gets a type of the template field position.
|
public int getType()
Gets a type of the template field position.
public Rectangle getRectangle()
Gets a rectangle of the field.
public String getRegex()
Gets a regular expression.
public String getRelatedFieldName()
Gets a name of the related field.
public int getRelatedPositionType()
Gets a field position relative to the related field.
public Size getSearchAreaSize()
Gets a size of the field.
Size
; null for non-related template fields.public boolean canScaleSearchAreaSize()
public static TemplateFieldPosition createFixed(Rectangle rectangle)
Creates a fixed template field position.
rectangle
- A rectangle that bounds the template field.TemplateFieldPosition
.public static TemplateFieldPosition createRegex(String regex)
Creates a regex template field position.
regex
- A string value that represents a regular expression to find the field.TemplateFieldPosition
.public static TemplateFieldPosition createRelated(String relatedFieldName, int relatedPositionType, Size searchAreaSize)
Creates a related template field position.
relatedFieldName
- A string value that represents a name of the related field.relatedPositionType
- A value that represents a field position relative to the related field.searchAreaSize
- A size of the field.TemplateFieldPosition
.public static TemplateFieldPosition createRelated(String relatedFieldName, int relatedPositionType, Size searchAreaSize, boolean canScaleSearchAreaSize)
Creates a related template field position.
relatedFieldName
- A string value that represents a name of the related field.relatedPositionType
- A value that represents a field position relative to the related field.searchAreaSize
- A size of the field.canScaleSearchAreaSize
- A boolean value indicating whether a SearchAreaSize
is scaled according to the related field.TemplateFieldPosition
.Copyright © 2019. All rights reserved.