Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [GEF4] Multiple parts/visuals for the same model object
[GEF4] Multiple parts/visuals for the same model object [message #1732758] Fri, 20 May 2016 03:06 Go to next message
Colin Sharples is currently offline Colin SharplesFriend
Messages: 90
Registered: July 2009
Location: Wellington, New Zealand

I have a couple of model objects that are quite tricky to render - they essentially need the same geometric shape rendered twice with two different paints, a background and a foreground if you like.

In GEF 3.x this was fairly easy - I had a single Figure that just drew the shape twice with different styles on the graphic context.

This seems a bit harder in GEF4/JavaFX. I have tried using a Canvas, but it kills performance when the overall drawing area is large, and it loses the connection to the geometric shape that you get with GeometryNode.

So, I was wondering if it was possible to create two parts for the same model object, one for the background and one for the foreground?

Colin Sharples
CTG Games Ltd
Wellington, New Zealand
Re: [GEF4] Multiple parts/visuals for the same model object [message #1732785 is a reply to message #1732758] Fri, 20 May 2016 08:24 Go to previous message
Matthias Wienand is currently offline Matthias WienandFriend
Messages: 163
Registered: March 2015
Senior Member
Hi Colin,

currently, it is not possible to have two content parts for the same model object. However, you can use Pair<OriginalModelObject, ForegroundOrBackground> as your model objects to practically achieve the same. On the other hand, it could be more convenient to use only one content part that manages two GeometryNodes for its visualization (wrapped in a Group).

Best regards,
Previous Topic:[GEF4] Selection handles for different actions
Next Topic:Some figures aren't drawn. Why?
Goto Forum:

Current Time: Sat Sep 22 13:20:57 GMT 2018

Powered by FUDForum. Page generated in 0.02060 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top