Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2D: Move connections behind figures
Draw2D: Move connections behind figures [message #229956] Mon, 29 January 2007 10:29 Go to next message
Eclipse UserFriend
Originally posted by: mayer.pst.ifi.lmu.de

Hello,

I have the following problem. I use Draw2D only (no GEF) to draw a
diagram. The graph is ordered in lines, so I use a vertical
Toolbarlayout for the complete graph, put (transparent) line figures
into the graph and then my (visible) nodes into those line figures
(which have a FlowLayout).

Now, I have connections between all my (visible) nodes. Those are
currently drawn OVER the figures instead of behind them.

Can anyone suggest a fix for this? I would like to control this
per-connection, as some connections are more important than others and
should be painted in front of figures.

Thanks,

Philip
Re: Draw2D: Move connections behind figures [message #230029 is a reply to message #229956] Tue, 30 January 2007 14:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mayer.pst.ifi.lmu.de

Solved. Was actually not a Draw2D but a GEF question(shame on me). For
anyone interested, I subclassed ScalableRootEditPart, overwriting
createPrintableLayers(), simply reordering the layers in that method,
and then adding the new root edit part to my ScrollingGraphicalViewer.

Note that all (global) figures must have setOpaque(false) for the
connections to show.

Thanks,

Philip

Philip Mayer schrieb:
> Hello,
>
> I have the following problem. I use Draw2D only (no GEF) to draw a
> diagram. The graph is ordered in lines, so I use a vertical
> Toolbarlayout for the complete graph, put (transparent) line figures
> into the graph and then my (visible) nodes into those line figures
> (which have a FlowLayout).
>
> Now, I have connections between all my (visible) nodes. Those are
> currently drawn OVER the figures instead of behind them.
>
> Can anyone suggest a fix for this? I would like to control this
> per-connection, as some connections are more important than others and
> should be painted in front of figures.
>
> Thanks,
>
> Philip
Re: Draw2D: Move connections behind figures [message #230192 is a reply to message #230029] Tue, 06 February 2007 23:55 Go to previous message
Eclipse UserFriend
Originally posted by: tunda123.gmail.com

Hi Philip,

I am fairly new to GEF and I am having a similar problem. I managed to subclass ScalableRootEditPart and switched the ordering of the layers. Then I couldn't see any of the connections even though I changed all my figures to setOpaque(false).

Can you please eloborate on what did you do to add a new rootEdit part to your ScrollingGraphicalViewer.
or anyother thing that you think I am doing wrong.
A quick reply would be greatly appreciated.

Thanks
Tunda
Previous Topic:How to place property set operations in commands?
Next Topic:Z-order problem
Goto Forum:
  


Current Time: Thu Mar 28 12:54:04 GMT 2024

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

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

Back to the top