CanScan
Loading...
Searching...
No Matches
fr.softsf.canscan.util.ValidationFieldHelper Enum Reference

Validates and sanitizes user input for QR code parameters. More...

+ Collaboration diagram for fr.softsf.canscan.util.ValidationFieldHelper:

Public Member Functions

int validateAndGetMargin (JSlider marginSlider)
 Validates and returns QR code margin from slider.
 
String validateAndGetMeetUID (String meetTitle)
 Generates a sanitized, uppercase, domain-suffixed UID based on a meeting title.
 
double validateAndGetRatio (JSlider ratioSlider)
 Validates and returns image-to-QR ratio from slider.
 
int validateAndGetSize (JTextField sizeField)
 Validates and returns QR code size from text field.
 

Public Attributes

 INSTANCE
 

Static Private Attributes

static final int DEFAULT_QR_CODE_DIMENSION = 400
 
static final int MARGIN_MAXIMUM_VALUE = 10
 
static final int MINIMUM_QR_CODE_DIMENSION = 10
 

Detailed Description

Validates and sanitizes user input for QR code parameters.

Member Function Documentation

◆ validateAndGetMargin()

int fr.softsf.canscan.util.ValidationFieldHelper.validateAndGetMargin ( JSlider marginSlider)

Validates and returns QR code margin from slider.

Parameters
marginSliderthe slider containing the margin value
Returns
validated margin between 0 and 10

◆ validateAndGetMeetUID()

String fr.softsf.canscan.util.ValidationFieldHelper.validateAndGetMeetUID ( String meetTitle)

Generates a sanitized, uppercase, domain-suffixed UID based on a meeting title.

Transforms the input title by removing accents, whitespace, and unsafe characters, keeping only Unicode letters, digits, underscores, and hyphens. The resulting string is uppercased and concatenated with the application domain suffix. The original title is not modified.

Parameters
meetTitlethe meeting title used as source text
Returns
a normalized and domain-qualified UID

◆ validateAndGetRatio()

double fr.softsf.canscan.util.ValidationFieldHelper.validateAndGetRatio ( JSlider ratioSlider)

Validates and returns image-to-QR ratio from slider.

Parameters
ratioSliderthe slider containing the ratio value
Returns
validated ratio between 0 and 1

◆ validateAndGetSize()

int fr.softsf.canscan.util.ValidationFieldHelper.validateAndGetSize ( JTextField sizeField)

Validates and returns QR code size from text field.

Parameters
sizeFieldthe text field containing the size value
Returns
validated size in pixels

Member Data Documentation

◆ DEFAULT_QR_CODE_DIMENSION

final int fr.softsf.canscan.util.ValidationFieldHelper.DEFAULT_QR_CODE_DIMENSION = 400
staticprivate

◆ INSTANCE

fr.softsf.canscan.util.ValidationFieldHelper.INSTANCE

◆ MARGIN_MAXIMUM_VALUE

final int fr.softsf.canscan.util.ValidationFieldHelper.MARGIN_MAXIMUM_VALUE = 10
staticprivate

◆ MINIMUM_QR_CODE_DIMENSION

final int fr.softsf.canscan.util.ValidationFieldHelper.MINIMUM_QR_CODE_DIMENSION = 10
staticprivate

The documentation for this enum was generated from the following file: