CanScan
Loading...
Searching...
No Matches
Package fr.softsf.canscan.ui.field

Classes

enum  FieldFilterType
 Defines the filtering strategies for text input fields. More...

Functions

record FieldConfig (JTextComponent field, FieldFilterType fieldFilterType, int maxLength, Runnable action)
 Configuration data for a validated UI text field.

Function Documentation

◆ FieldConfig()

record fr.softsf.canscan.ui.field.FieldConfig ( JTextComponent field,
FieldFilterType fieldFilterType,
int maxLength,
Runnable action )

Configuration data for a validated UI text field.

This record encapsulates the component, its filtering strategy, length constraints, and the action to trigger upon document changes.

Parameters
fieldThe JTextComponent component to be configured.
fieldFilterTypeThe FieldFilterType determining the sanitization strategy.
maxLengthThe maximum number of characters allowed for this field.
actionThe Runnable callback to execute when the content changes.
Returns
New instance or null if any parameter is null.
Here is the call graph for this function: