Date Text Builder
Defined in package com.scandit.datacapture.label.capture
- DateTextBuilder
class DateTextBuilder : TextFieldBuilder
Added in version 7.6.0
Builder class for creating DateText field definitions. Provides a fluent interface for configuring text field properties including validation patterns, location constraints, and OCR-specific settings.
- setDataTypePatterns(dataTypePatterns)
@NonNull DateTextBuilder setDataTypePatterns(@NonNull String dataTypePatterns)
Added in version 7.6.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 pattern (e.g., when both packaging and expiry dates are present).
- setDataTypePatterns(dataTypePatterns)
@NonNull DateTextBuilder setDataTypePatterns(@NonNull Iterable<@NonNull String> dataTypePatterns)
Added in version 7.6.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 pattern (e.g., when both packaging and expiry dates are present).
- setDataTypePattern(dataTypePattern)
@NonNull DateTextBuilder setDataTypePattern(@NonNull Regex dataTypePattern)
Added in version 7.6.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 pattern (e.g., when both packaging and expiry dates are present).
- resetDataTypePatterns()
@NonNull DateTextBuilder resetDataTypePatterns()
Added in version 7.6.0
This method can be used to remove the default dataTypePattern, allowing you to rely solely on the patterns for detection.
- setLabelDateFormat(labelDateFormat)
@NonNull DateTextBuilder setLabelDateFormat(@NonNull LabelDateFormat labelDateFormat)
Added in version 7.6.0
Sets a LabelDateFormat to use when recognising this date.
- build(name)
@NonNull DateText build(@NonNull String name)
Added in version 7.6.0
Creates a DateText field definition with the specified name and all configured properties.
- getThis()
@NonNull DateTextBuilder getThis()
Added in version 7.6.0
Returns this builder instance for method chaining.