TiwulFX 2.0 works with Java8. Please go to Download page to get this release. If you are using java 1.7 you can use version 1.3.
Here are the new features:
- Validation of a cell in TableControl is executed on commitEdit event. The validation popup also has better appearance.
- Load, save and delete in TableControl are executed in background tasks. A progress indicator is displayed if the task is running. At this time, TableControl buttons are disabled.
- TextColumn has 2 handy properties: maxLength and capitalize. The first one is to restrict how many characters TextColumn can accept. The second is to make its characters capitalized.
- DetachableTabPane can have custom SceneFactory.
- TypeAheadField/Control/Column will make you forget ComboBox. It has filter-as-user-type capability. Also
typeAheadField.addItem(String Label,Object object)is a handy method to add an item along with its label without having to create custom StringConverter.
- DateControl & DateColumn now use JavaFX’s DatePicker. There are also LocalDateControl and LocalDateColumn components.
- Save column position is a new feature to keep user’s preference of column order. Just set
tableControl.setConfigurationID(String uniqueId)to activate this feature. You can set this property in FXML file as well. To reset the column position, take a look at gear button at the bottom right of TableControl. You’ll find something there.
- Able to define columns in FXML file.
- JavaFX TableView notorious of its lack of refresh method. TiwulFX TableControl provide not only one, but two. First,
tableContro.refresh()to refresh the whole rows. The second,
tableControl.refresh(R record)to refresh particular row that hold specified record. Take a look at TiwulFX Demo – Synchronized Columns.
- Get the list of changes from TableControl. Useful if we want to log all changes in a separate table.
- And the most important thing for developer, customizing or extending TiwulFX is easier now. Columns and their cells are in separates classes. For example, to add a custom behavior to textField in TextColumn, just extends TextTableCell, and override getEditor() method. You’ll get reference to the editor component (textfield in this case) so you can add listener, or custom behavior to it. And finally set the column’s cellFactory with yours.
Lastly, please give us feedback. If you have feature request, or find a bug, let us know in our issue tracker.