Skip to main content



      Home
Home » Eclipse Projects » GEF » Layout for multiple IFigure children of a PolylineConnection?
Layout for multiple IFigure children of a PolylineConnection? [message #1059821] Tue, 21 May 2013 14:06 Go to next message
Eclipse UserFriend
Is there a way to specify a layout for children of a PolylineConnection?

I want to add several Labels to a PolylineConnection at ConnectionLocator.MIDDLE without the use of a container figure for the labels.

Both PolylineConnection and Label have EditParts, and the label's model objects are children of the polyline connection's model objects.

Ideally I want to add all label children of a polyline to ConnectionLocator.MIDDLE in a ToolbarLayout...

     ________
     | NODE |
     --------
        |
        |
        |
      Label 1
      Label 2
      Label 3
        |
        |
        |
        |
        |
     ________
     | NODE |
     --------

Re: Layout for multiple IFigure children of a PolylineConnection? [message #1063165 is a reply to message #1059821] Wed, 12 June 2013 10:06 Go to previous messageGo to next message
Eclipse UserFriend
You can set any LayoutManager to the PolylineConnection you want. By default it uses DelegatingLayout which gives
the layout responsibility to the children using Locator.relocate() provided as a constraint.
Re: Layout for multiple IFigure children of a PolylineConnection? [message #1063554 is a reply to message #1063165] Thu, 13 June 2013 08:06 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, Jan!

In the meantime, I've found a workaround with using ConnectionLocator.MIDDLE for the first child and using RelativeLocator for the rest (cf. this blog post)...

I think this is actually using the default DelegatingLayout you mention?
Re: Layout for multiple IFigure children of a PolylineConnection? [message #1064047 is a reply to message #1063554] Mon, 17 June 2013 07:53 Go to previous messageGo to next message
Eclipse UserFriend
Yes, it is.

Actually, the DelegatingLayout is the default layout manager used on PolylineConnections and implementation of the Locator is a constraint for it.

It's the same as XYLayout and a Rectangle(it's constraint).
Re: Layout for multiple IFigure children of a PolylineConnection? [message #1064294 is a reply to message #1064047] Tue, 18 June 2013 10:53 Go to previous message
Eclipse UserFriend
Thanks for the clarification!
Previous Topic:Layouting a large number of draw2d widgets in a Canvas
Next Topic:GEF4 double-precision graphics on GEF3-based editor
Goto Forum:
  


Current Time: Wed Jul 23 18:33:18 EDT 2025

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

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

Back to the top