CanScan
Loading...
Searching...
No Matches
fr.softsf.canscan.ui.MyTextField Class Reference

Custom text field implementation designed to extend standard JTextField functionality by intercepting and consuming mouse events with a click count greater than two. More...

Inheritance diagram for fr.softsf.canscan.ui.MyTextField:
Collaboration diagram for fr.softsf.canscan.ui.MyTextField:

Public Member Functions

 MyTextField (int columns)
 Constructs a new text field with the specified number of columns.
 MyTextField (String text, int columns)
 Constructs a new text field with the specified initial text and columns.

Protected Member Functions

void processMouseEvent (MouseEvent e)
 Processes mouse events to intercept and drop click counts greater than two.

Detailed Description

Custom text field implementation designed to extend standard JTextField functionality by intercepting and consuming mouse events with a click count greater than two.

This prevents UI layout freezes and excessive Event Dispatch Thread saturation caused by rendering selection bounds on extremely long, continuous, non-whitespace character strings.

Constructor & Destructor Documentation

◆ MyTextField() [1/2]

fr.softsf.canscan.ui.MyTextField.MyTextField ( String text,
int columns )

Constructs a new text field with the specified initial text and columns.

Parameters
textthe initial text to display
columnsthe number of columns to use to calculate preferred width

◆ MyTextField() [2/2]

fr.softsf.canscan.ui.MyTextField.MyTextField ( int columns)

Constructs a new text field with the specified number of columns.

Parameters
columnsthe number of columns to use to calculate preferred width

Member Function Documentation

◆ processMouseEvent()

void fr.softsf.canscan.ui.MyTextField.processMouseEvent ( MouseEvent e)
protected

Processes mouse events to intercept and drop click counts greater than two.

Parameters
ethe mouse event to process

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