ConnectionLayer in GEF [message #54004] |
Sun, 12 January 2003 14:15  |
Eclipse User |
|
|
|
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 14:45   |
Eclipse User |
|
|
|
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 16:07  |
Eclipse User |
|
|
|
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.
> >
> >
>
|
|
|
Powered by
FUDForum. Page generated in 0.03264 seconds