Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Two kinds of connections
Two kinds of connections [message #218369] Fri, 23 June 2006 08:57 Go to next message
Eclipse UserFriend
Originally posted by: dieter.bogdoll.siemens.com

Hi,

I have two kinds of connections. It is possible that between any
two verteces two different kinde of edges are drawn.
Visually the edges differ in the line width and color.

I would like to enforce that the connection type A is always
drawn on top of connection type B. I couldn't find a mechanism
how to assure that.

Thanks.

Dieter Bogdoll
Re: Two kinds of connections [message #218412 is a reply to message #218369] Fri, 23 June 2006 20:47 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
Connections are typically stored in a different layout called the
ConnectionLayer. It may be possible to have 2 different ConnectionLayers
with the desired z-order you're looking for. Then when connections are
added to the connection layer you would differentiate based on type.

-Steve

"Dieter Bogdoll" <dieter.bogdoll@siemens.com> wrote in message
news:8cd678aa21af37601bfc0ba8f231eafc$1@www.eclipse.org...
> Hi,
>
> I have two kinds of connections. It is possible that between any
> two verteces two different kinde of edges are drawn.
> Visually the edges differ in the line width and color.
>
> I would like to enforce that the connection type A is always
> drawn on top of connection type B. I couldn't find a mechanism
> how to assure that.
>
> Thanks.
>
> Dieter Bogdoll
>
Re: Two kinds of connections [message #219070 is a reply to message #218369] Thu, 06 July 2006 20:54 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

connection z-order is not important in GEF and you could control it in your
application. In your connection editpart, you could override:

protected void activateFigure() {
getLayer(CONNECTION_LAYER).add(getFigure());
}

to be:

protected void activateFigure() {
getLayer(CONNECTION_LAYER).add(getFigure(), shouldBeOntop() ? -1 : 0);
}

"Dieter Bogdoll" <dieter.bogdoll@siemens.com> wrote in message
news:8cd678aa21af37601bfc0ba8f231eafc$1@www.eclipse.org...
> Hi,
>
> I have two kinds of connections. It is possible that between any two
> verteces two different kinde of edges are drawn. Visually the edges differ
> in the line width and color.
>
> I would like to enforce that the connection type A is always
> drawn on top of connection type B. I couldn't find a mechanism
> how to assure that.
>
> Thanks.
>
> Dieter Bogdoll
>
Previous Topic:How to synchronize the two scrollbar movements of two graphical viewers
Next Topic:Shapes Example
Goto Forum:
  


Current Time: Thu Dec 18 23:07:01 GMT 2014

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

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