Note

This API is still in beta and may change in future versions of Scandit Data Capture SDK.

Text Definition Builder

Defined in library scandit_datacapture_barcode

TextDefinitionBuilder
class TextDefinitionBuilder

Added in version 8.1.0

A fluent builder class for creating TextDefinition objects with a convenient, chainable interface. This builder provides methods to add various field types and configure their properties in a structured manner.

TextDefinitionBuilder(identifier)
 TextDefinitionBuilder(TextIdentifier identifier)

Added in version 8.1.0

Creates a new builder for the given identifier.

setOptional(optional)
TextDefinitionBuilder setOptional(bool optional)

Added in version 8.1.0

Sets whether the text component is optional in the item definition. Returns the builder for configuring the rest of the properties.

setSemantics(semantics)
TextDefinitionBuilder setSemantics(ScanComponentTextSemanticType semantics)

Added in version 8.1.0

Sets a predefined semantics type for the text. Returns the builder for configuring the rest of the properties.

setLocation(location)
TextDefinitionBuilder setLocation(Quadrilateral? location)

Added in version 8.1.0

Sets an expected location for the text. Returns the builder for configuring the rest of the properties.

setHiddenProperties(hiddenProperties)
TextDefinitionBuilder setHiddenProperties(
        String hiddenProperties)

Added in version 8.1.0

Sets the hidden properties for the component. Returns the builder for configuring the rest of the properties.

setValueRegexes(valueRegexes)
TextDefinitionBuilder setValueRegexes(List<String> valueRegexes)

Added in version 8.1.0

Sets the value regexes for the text. Returns the builder for configuring the rest of the properties.

setAnchorRegexes(anchorRegexes)
TextDefinitionBuilder setAnchorRegexes(List<String> anchorRegexes)

Added in version 8.1.0

Sets the anchor regexes for the text. Returns the builder for configuring the rest of the properties.

build()
TextDefinition build()

Added in version 8.1.0

Builds the TextDefinition object.