AutoReplaceField
TextField extension that automatically modifies the text while you type it. Includes some derived classes like DoubleField and EuroField.
AutoReplaceField is a component that can automatically do regexp-replace-all operations for the field value while user types it.
The AutoReplace field is a good starting point for quickly subclassing custom components. The package contains ready sub classes like IntegerField, DoubleField and EuroField.
Sample code
// no casting required when using derived classes Double doubleValue = doubleField.getValue(); Integer value = integerField.getValue(); Double euroValue = euroField.getValue();
AutoReplaceField ar = new AutoReplaceField(); ar.setCaption("Try typing 'foo' into this field"); ar.addReplaceRule("foo", "bar"); mainWindow.addComponent(ar);
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
- Tuned the user experience on complex rules (garret should stay put)
- Better demos and derived helper fields
- Released
- 2010-06-16
- Maturity
- EXPERIMENTAL
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 6.0+
- Browser
- Internet Explorer
- Internet Explorer
- Internet Explorer
- Firefox
- Opera
- Safari
AutoReplaceField - Vaadin Add-on Directory
TextField extension that automatically modifies the text while you type it. Includes some derived classes like DoubleField and EuroField.AutoReplaceField is a component that can automatically do regexp-replace-all operations for the field value while user types it.
The AutoReplace field is a good starting point for quickly subclassing custom components. The package contains ready sub classes like IntegerField, DoubleField and EuroField.