[GEF4] layout in mvc [message #1715306] |
Sat, 21 November 2015 13:26 |
Frank Benoit Messages: 179 Registered: July 2009 |
Senior Member |
|
|
Hi
as far as i understood, i can implement the interfaces in o.e.g.layout.
In the beginning, i just want to calculate the positions of the part's visuals.
without layout, i apply the position in the refreshVisual:
Affine affine = getAdapter(FXTransformPolicy.TRANSFORM_PROVIDER_KEY).get();
affine.setTx(pos.x);
affine.setTy(pos.y);
Now, i guess for using layout, i need to take my model elements, and build a hierarchy of objects, implementing the IEntityLayout or ISubgraphLayout interfaces.
Then i need an implementation of ILayoutAlgorithm and in applyLayout, i set the calculations with LayoutProperties.setLocation().
And then,
1. how is this layout applied in Gef4.MVC
2. how do those positions find their way to be reflected in the UI?
thx
Frank
|
|
|
Powered by
FUDForum. Page generated in 0.03977 seconds