Note
This API is still in beta and may change in future versions of Scandit Data Capture SDK.
Text Definition Builder
Defined under the namespace Scandit.Datacapture.Barcode
- TextDefinitionBuilder
class TextDefinitionBuilderAdded 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.
- constructor(identifier)
constructor(identifier: TextIdentifier)
Added in version 8.1.0
Creates a new builder for the given identifier.
- setOptional(optional)
setOptional(optional: boolean): TextDefinitionBuilder
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)
setSemantics(semantics: ScanComponentTextSemanticType): TextDefinitionBuilder
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)
setLocation(location: Quadrilateral | null): TextDefinitionBuilder
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)
setHiddenProperties(hiddenProperties: string): TextDefinitionBuilder
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)
setValueRegexes(valueRegexes: string[]): TextDefinitionBuilder
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)
setAnchorRegexes(anchorRegexes: string[]): TextDefinitionBuilder
Added in version 8.1.0
Sets the anchor regexes for the text. Returns the builder for configuring the rest of the properties.
- build()
build(): TextDefinition
Added in version 8.1.0
Builds the TextDefinition object.