a port of Mage to JavaFX