javafx.scene.control.TextFormatter.Change Java Examples
The following examples show how to use
javafx.scene.control.TextFormatter.Change.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MetaPanel.java From paintera with GNU General Public License v2.0 | 4 votes |
@Override public Change apply(final Change t) { final String input = t.getText(); return input.matches("\\d*(\\.\\d*)?") ? t : null; }
Example #2
Source File: NumberField.java From trex-stateless-gui with Apache License 2.0 | 4 votes |
@Override public Change apply(final Change change) { change.setText(change.getText().toUpperCase()); return PATTERN.matcher(change.getControlNewText()).matches() ? change : null; }
Example #3
Source File: NumberField.java From trex-stateless-gui with Apache License 2.0 | 4 votes |
@Override public Change apply(final Change change) { change.setText(change.getText().toUpperCase()); return PATTERN.matcher(change.getControlNewText()).matches() ? change : null; }