Hi all,

I decided to use JTextField instead of JFormattedTextField for NumberParameter. 
The reason is that JFormattedTextField has some very odd properties:
- value reported by getValue() may be different than the value actually typed 
in the text box, because it has not been "committed" yet by pressing enter or 
changing the focus
- listeners are not notified about value change until that value is committed 
- when format is set to e.g. 1 decimal digit ("0.0"), it becomes impossible to 
enter 2 decimals, which is frustrating for the user

So, I split the NumberParameter into 2: DoubleParameter and IntegerParameter. 
Both of them use JTextField as an editing component.

Cheers,

Tomas


===============================================
Tomas Pluskal
G0 Cell Unit, Okinawa Institute of Science and Technology
1919-1 Tancha, Onna-son, Okinawa 904-0412, Japan
TEL:  +81-98-966-8684





------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Mzmine-devel mailing list
Mzmine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mzmine-devel

Reply via email to