JavaFX custom controls
We started with our JavaFX UI in January and we are on the home stretch!
All features were implemented and we have some Feature Requests and known Bugs in our Ticketing system and some open Issues in the JavaFX ticketing system (JIRA, at the moment).
At the beginning we thought that 2 months will be sufficient to implement the whole UI We were very optimistic but not far away from the reality but we didn't know that JavaFX had a lot of missing pieces.
Missing pieces?
Don't get me wrong, because JavaFX is an awesome UI toolkit and will be a perfect replacement for Swing, but it needs some real world applications. Yes, applications and not fancy hello world examples. Sure, there are some great applications but most use custom controls because of problems with standard controls. The overall performance is still not perfect and there's still a lot of tuning potential. Currently a swing application acts faster without delays.
The biggest problem for us was that standard controls like Toolbar, Menus didn't work as expected and other controls like DesktopPane or Internal Frame weren't available. We didn't find a date + time combobox editor. Some standard controls like Button, CheckBox or RadioButon didn't offer specific alignment options and another problem was the coding philosophy because many useful methods are public final or private. You can't replace internal listeners or remove internal listeners because you can't access all list elements.
But this article shouldn't cover our development problems because many of them will be solved with Java8 u60 and we have custom controls for the rest. Currently we have many useful classes for our UI and also for you, because we tried to implement all extensions independent of JVx. This article gives a short overview.
Re-usable controls and classes
- FXSelectableLabel
A selectable label, like RadioButton or CheckBox.
- FXMonthView
A simple month pane.
- FXDateTimePicker
- FXButton, FXCheckBox, FXRadioButton, FXToggleButton
Better alignment control for the text:
- FXImageChoiceBox
A multi-state control with image representation of selected value.
- FXNumberField
Only accepts numbers.
- FXPasswordField
Optionally shows a custom character instead of the bullet.
- FXTextArea
A TextArea with horizontal alignment support.
We have some additional classes without images:
- FXNullPane
Acts like a Swing panel with null layout.
- FXSceneLocker
From the javadoc: The FXSceneLocker is a static helper utility that allows to to lock a Scene, meaning that only events that belong to the locking Node or its children are processed. If a Scene is locked by multiple Nodes, that last one does receive events.
You'll find all other utilities and controls in the dev repositoriy. The ext Package is independent of JVx. We use it as base for our UI implementation.