GDS-1084 JavaFX port of the refactoring