UnitFX is a lightweight framework for creating textfield input controls based on a "unit of measure" UOM. Currently the only documentation is the source code itself. Please take a look at the file DemoApp.java to find out how to use the framework.
QuantityInputField will perform validation and conversion between different units out-of-the-box. A "base" unit can be set on a textfield and the field will be highlighted when the user changes the textfield's unit to something different than the base unit.