Can JavaFX do CAD?

Werner Lehmann lehmann at
Mon Jul 29 05:58:29 PDT 2013

Good questions. I've had experience with some of these, building a GUI 
designer. At this stage customers will use it to build input forms. 
Later it is supposed to grow into sort of a report designer.

The core is a custom component containing a ScrollPane containing a 
content pane. And that pane has several transparent layers spanning the 
whole (scrolled) content area. There are layers for a grid, the content 
items, selection, decoration, and hints. There've been rough edges and 
workarounds but I am quite happy with the result. This would have been 
more difficult in Swing.

On 24.07.2013 01:21, Daniel Zwolenski wrote:
> - How best to represent large numbers of complex shapes efficiently, and when to add shapes to the scene (add all and let jfx clip, or manually work out what should be showing, etc)

Fortunately my scenes are usually not that complex. A few 10k nodes can 
be expected.

> - How best to handle font scaling and image scaling when rendered in a zoomed in/out viewport

I have not looked into this. I guess it would be relevant for us to 
support touch.

> - How best to do panning and zooming with dynamic level of detail

Dynamic level of detail is another important one. We may need to address 
this for a different component, showing tons of data which can be zoomed 

> - How best to do the top level display in terms of panes vs regions vs canvas, vs whatever, how to manage overlays and layers (sharing same coordinate space, etc)
> - How best to do picking, mouse overs, dragging across the 'display'
> - How best to do infinite or dynamic  bounds so you can add and move shapes and the scrolling adjusts accordingly.

As described above, several pane/region based layers in a scrollpane 
work satisfactorily for us. Bounds are already dynamic, simply resize 
the ScrollPane content node. Mouse picking, dragging, etc. works with 
mouse event filters on the scrolled content node.


More information about the openjfx-dev mailing list