In this step 2 of the tutorial, the model shall be changed to hold only a position, a text and the color. The size of the rectangle surrounding the text is done automatically by the part.
For the source code see github gef4.mvc.tutorial2
The ModelPart is now extending AbstractFXContentPart<Group>, so the visual representation can be composed of a rounded rectangle and a text.
The ModelPart first creates the Text object, uses a "through away Scene" to be able to retrieve the measurements of the text, than uses this information to setup the rectangle bounds and text position.