Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ConnectionLayer in GEF
ConnectionLayer in GEF [message #54004] Sun, 12 January 2003 19:15 Go to next message
yinglcs is currently offline yinglcsFriend
Messages: 64
Registered: July 2009
Member
Hi,

Can someone please tell me how to use ConnectionLayer in GEF? Is there an
example somewhere? From the javadoc, it is a layer for connection and
primary layer is for figures. If I want all figures on top of all
Connections, do I need to have 1 connection layer and 1 primary layer? if
yes, where should I create and add those layers to? to the main editor?

thanks for any help.
Re: ConnectionLayer in GEF [message #54019 is a reply to message #54004] Sun, 12 January 2003 19:45 Go to previous messageGo to next message
Eric Bordeau is currently offline Eric BordeauFriend
Messages: 259
Registered: July 2009
Senior Member
The layers are created in FreeformGraphicalRootEditPart.createLayers(LayeredPane). The layers are
stacked on top of each other based on the order they were added to the LayeredPane. You'll notice
the connection layer is added after the primary layer, so connections get drawn on top of the
figures. Switching the order in which these layers get added would put the connection layer behind
the primary layer, but there's a problem with this approach. The content of the primary layer is
the figure for the LogicDiagramEditPart, which is opaque and covers the entire layer. This means
the connections won't be visible since the diagram figure will be painted on top of the connections.
The same holds true for CircuitFigures. Any connections inside a circuit wouldn't be visible.

Eric


yinglcs wrote:
> Hi,
>
> Can someone please tell me how to use ConnectionLayer in GEF? Is there an
> example somewhere? From the javadoc, it is a layer for connection and
> primary layer is for figures. If I want all figures on top of all
> Connections, do I need to have 1 connection layer and 1 primary layer? if
> yes, where should I create and add those layers to? to the main editor?
>
> thanks for any help.
>
>
Re: ConnectionLayer in GEF [message #54038 is a reply to message #54019] Sun, 12 January 2003 21:07 Go to previous message
yinglcs is currently offline yinglcsFriend
Messages: 64
Registered: July 2009
Member
Could you please what is the best approach to make Connections behind
figures and invisible when they overlap? And both connections and figures
are visible when they are not overlap?



"Eric Bordeau" <ebordeau@us.ibm.com> wrote in message
news:avsfnf$vi7$2@rogue.oti.com...
> The layers are created in
FreeformGraphicalRootEditPart.createLayers(LayeredPane). The layers are
> stacked on top of each other based on the order they were added to the
LayeredPane. You'll notice
> the connection layer is added after the primary layer, so connections get
drawn on top of the
> figures. Switching the order in which these layers get added would put
the connection layer behind
> the primary layer, but there's a problem with this approach. The content
of the primary layer is
> the figure for the LogicDiagramEditPart, which is opaque and covers the
entire layer. This means
> the connections won't be visible since the diagram figure will be painted
on top of the connections.
> The same holds true for CircuitFigures. Any connections inside a
circuit wouldn't be visible.
>
> Eric
>
>
> yinglcs wrote:
> > Hi,
> >
> > Can someone please tell me how to use ConnectionLayer in GEF? Is there
an
> > example somewhere? From the javadoc, it is a layer for connection and
> > primary layer is for figures. If I want all figures on top of all
> > Connections, do I need to have 1 connection layer and 1 primary layer?
if
> > yes, where should I create and add those layers to? to the main editor?
> >
> > thanks for any help.
> >
> >
>
Previous Topic:TemplateTransferDropTargetListener
Next Topic:Testers needed for Php-Uml-Editor...
Goto Forum:
  


Current Time: Wed Jul 17 22:25:35 GMT 2024

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

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

Back to the top