Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Put Connections into Background
Put Connections into Background [message #218182] Tue, 20 June 2006 16:59 Go to next message
Eclipse UserFriend
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 messageGo to next message
Mohammed Mostafa is currently offline Mohammed MostafaFriend
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">&nbsp; &nbsp; &nbsp; &nbsp; 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">&nbsp; &nbsp; &nbsp; &nbsp; 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">&nbsp; &nbsp; &nbsp; &nbsp; 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">&nbsp; &nbsp; &nbsp; &nbsp; </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">&nbsp; &nbsp; &nbsp; &nbsp; 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">&nbsp; &nbsp; &nbsp; &nbsp; 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">&nbsp; &nbsp; &nbsp; &nbsp; 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">&nbsp; &nbsp; &nbsp; &nbsp; </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_=--
Re: Put Connections into Background [message #218356 is a reply to message #218333] Fri, 23 June 2006 07:07 Go to previous message
Eclipse UserFriend
Originally posted by: puneet82sri.sify.com

if i m using only draw2d then how can we resolve the issue
where i m drawing all my figures over a basefigure(Figure type).
i m very new to gef
thnx
Previous Topic:Trouble with labels and child editparts.
Next Topic:Will antialiasing API appear on IFigure?
Goto Forum:
  


Current Time: Sun Dec 21 14:41:07 GMT 2014

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

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