Custom Text Builder

Defined in package com.scandit.datacapture.label.capture

CustomTextBuilder
class CustomTextBuilder : TextFieldBuilder

Added in version 6.21.0

Builder class for creating CustomText field definitions. Provides a fluent interface for configuring text field properties including validation regexes, location constraints, and OCR-specific settings.

location
@NonNull LabelFieldLocation getLocation()
void setLocation(@NonNull LabelFieldLocation value)

Added in version 6.21.0

setLocation(location)
@NonNull CustomTextBuilder setLocation(@NonNull LabelFieldLocation location)

Added in version 6.21.0

setLocation(location)
@NonNull CustomTextBuilder setLocation(@NonNull RectF location)

Added in version 6.21.0

setLocation(left, top, right, bottom)
@NonNull CustomTextBuilder setLocation(float left,
        float top,
        float right,
        float bottom)

Added in version 6.21.0

setLocation(location)
@NonNull CustomTextBuilder setLocation(@NonNull Rect location)

Added in version 6.21.0

setAnchorRegexes(anchorRegexes)
@NonNull CustomTextBuilder setAnchorRegexes(@NonNull String anchorRegexes)

Added in version 8.0.0

Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same regex (e.g., when both packaging and expiry dates are present).

setAnchorRegexes(anchorRegexes)
@NonNull CustomTextBuilder setAnchorRegexes(@NonNull Iterable<@NonNull String> anchorRegexes)

Added in version 8.0.0

Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same regex (e.g., when both packaging and expiry dates are present).

setAnchorRegex(anchorRegex)
@NonNull CustomTextBuilder setAnchorRegex(@NonNull Regex anchorRegex)

Added in version 8.0.0

Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same regex (e.g., when both packaging and expiry dates are present).

resetAnchorRegexes()
@NonNull CustomTextBuilder resetAnchorRegexes()

Added in version 8.0.0

This method can be used to remove the default anchorRegex, allowing you to rely solely on the valueRegexes for detection.

build(name)
@NonNull CustomText build(@NonNull String name)

Added in version 6.21.0

Creates a CustomText field definition with the specified name and all configured properties.

getThis()
@NonNull CustomTextBuilder getThis()

Added in version 6.21.0

Returns this builder instance for method chaining.