Put Connections into Background [message #218182] |
Tue, 20 June 2006 16:59 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: pbp.j-o-p.de
Hi,
I use draw2d to visualize diagrams. Normally, the connections are
displayed in front of the nodes. How can I put them into the background?
Thanks a lot!
pbp
|
|
|
Re: Put Connections into Background [message #218333 is a reply to message #218182] |
Thu, 22 June 2006 17:28 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Mohammed Mostafa![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=mmostafa%40ca.ibm.com) Messages: 143 Registered: July 2009 |
Senior Member |
|
|
This is a multipart message in MIME format.
--=_alternative 00602D5B85257195_=
Content-Type: text/plain; charset="US-ASCII"
You can override the FreeformGraphicalRootEditPart#createPrintableLayers
to do this :
FreeformLayeredPane layeredPane = new FreeformLayeredPane();
layeredPane.add(new ConnectionLayer(), CONNECTION_LAYER);
layeredPane.add(new FreeformLayer(), PRIMARY_LAYER);
return layeredPane;
instead of the default implementation:
FreeformLayeredPane layeredPane = new FreeformLayeredPane();
layeredPane.add(new FreeformLayer(), PRIMARY_LAYER);
layeredPane.add(new ConnectionLayer(), CONNECTION_LAYER);
return layeredPane;
this will do the trick, also you have to set your subclass of
FreeformGraphicalRootEditPart and as the root edit part
--=_alternative 00602D5B85257195_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">You can override the </font><font size=2 face="Courier New">FreeformGraphicalRootEditPart</font><font size=2 face="sans-serif">#</font><font size=2 face="Courier New">createPrintableLayers</font><font size=2 face="sans-serif">
to do this :</font>
<br>
<br><font size=2 face="Courier New"> FreeformLayeredPane
layeredPane = </font><font size=2 color=#820040 face="Courier New"><b>new</b></font><font size=2 face="Courier New">
FreeformLayeredPane();</font>
<br><font size=2 face="Courier New"> layeredPane.add(</font><font size=2 color=#820040 face="Courier New"><b>new</b></font><font size=2 face="Courier New">
ConnectionLayer(), </font><font size=2 color=#0021bf face="Courier New"><i>CONNECTION_LAYER</i></font><font size=2 face="Courier New">);</font>
<br><font size=2 face="Courier New"> layeredPane.add(</font><font size=2 color=#820040 face="Courier New"><b>new</b></font><font size=2 face="Courier New">
FreeformLayer(), </font><font size=2 color=#0021bf face="Courier New"><i>PRIMARY_LAYER</i></font><font size=2 face="Courier New">);</font>
<br><font size=2 face="Courier New"> </font><font size=2 color=#820040 face="Courier New"><b>return</b></font><font size=2 face="Courier New">
layeredPane;</font>
<br>
<br><font size=2 face="sans-serif">instead of the default implementation:</font>
<br>
<br><font size=2 face="Courier New"> FreeformLayeredPane
layeredPane = </font><font size=2 color=#820040 face="Courier New"><b>new</b></font><font size=2 face="Courier New">
FreeformLayeredPane();</font>
<br><font size=2 face="Courier New"> layeredPane.add(</font><font size=2 color=#820040 face="Courier New"><b>new</b></font><font size=2 face="Courier New">
FreeformLayer(), </font><font size=2 color=#0021bf face="Courier New"><i>PRIMARY_LAYER</i></font><font size=2 face="Courier New">);</font>
<br><font size=2 face="Courier New"> layeredPane.add(</font><font size=2 color=#820040 face="Courier New"><b>new</b></font><font size=2 face="Courier New">
ConnectionLayer(), </font><font size=2 color=#0021bf face="Courier New"><i>CONNECTION_LAYER</i></font><font size=2 face="Courier New">);</font>
<br><font size=2 face="Courier New"> </font><font size=2 color=#820040 face="Courier New"><b>return</b></font><font size=2 face="Courier New">
layeredPane;</font>
<br>
<br><font size=2 face="Courier New">this will do the trick, also you have
to set your subclass of FreeformGraphicalRootEditPart and as the root edit
part</font>
<br>
<br>
<br>
--=_alternative 00602D5B85257195_=--
|
|
|
|
Powered by
FUDForum. Page generated in 0.03363 seconds