Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Connector z-order
Connector z-order [message #240808] Fri, 18 January 2008 16:17 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
What is the trick to making connectors stay in back of the z-order instead
of the front? Sometimes when I expand shapes I would prefer the shape to be
in front of all connectors. This happens when I expand a shape and it covers
other shapes in the vincinity and there are connectors drawn to the other
shapes (not the one I expanded).
Re: Connector z-order [message #240813 is a reply to message #240808] Fri, 18 January 2008 18:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sebukoleth.gmail.com

Drew Frantz wrote:
> What is the trick to making connectors stay in back of the z-order instead
> of the front? Sometimes when I expand shapes I would prefer the shape to be
> in front of all connectors. This happens when I expand a shape and it covers
> other shapes in the vincinity and there are connectors drawn to the other
> shapes (not the one I expanded).
>
>
public MyRootEditpart extends ScalableFreeformRootEditPart {

protected LayeredPane createPrintableLayers() {
FreeformLayeredPane pane = new FreeformLayeredPane();

Layer layer = new ConnectionLayer();
layer.setPreferredSize(new Dimension(5, 5));
pane.add(layer, CONNECTION_LAYER);
layer = new FreeformLayer();
layer.setLayoutManager(new FreeformLayout());
pane.add(layer, PRIMARY_LAYER);

return pane;
}

Now the connection layer will be in the back of all shapes. So all
connections will stay in the back. Down part to this? Shapes can hide
connections.

Sebu
Re: Connector z-order [message #240862 is a reply to message #240813] Mon, 21 January 2008 14:54 Go to previous messageGo to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
works great thanks


"Sebu T. Koleth" <sebukoleth@gmail.com> wrote in message
news:fmqq6t$cnb$1@build.eclipse.org...
> Drew Frantz wrote:
>> What is the trick to making connectors stay in back of the z-order
>> instead of the front? Sometimes when I expand shapes I would prefer the
>> shape to be in front of all connectors. This happens when I expand a
>> shape and it covers other shapes in the vincinity and there are
>> connectors drawn to the other shapes (not the one I expanded).
> public MyRootEditpart extends ScalableFreeformRootEditPart {
>
> protected LayeredPane createPrintableLayers() {
> FreeformLayeredPane pane = new FreeformLayeredPane();
>
> Layer layer = new ConnectionLayer();
> layer.setPreferredSize(new Dimension(5, 5));
> pane.add(layer, CONNECTION_LAYER);
> layer = new FreeformLayer();
> layer.setLayoutManager(new FreeformLayout());
> pane.add(layer, PRIMARY_LAYER);
>
> return pane;
> }
>
> Now the connection layer will be in the back of all shapes. So all
> connections will stay in the back. Down part to this? Shapes can hide
> connections.
>
> Sebu
Re: Connector z-order [message #240882 is a reply to message #240862] Tue, 22 January 2008 09:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: anagha.deshpande.tcs.com

Can u tell me
what is CONNECTION_LAYER and PRIMARY_LAYER in it ?
Re: Connector z-order [message #240890 is a reply to message #240882] Tue, 22 January 2008 18:13 Go to previous message
Eclipse UserFriend
Originally posted by: sebukoleth.gmail.com

Anagha wrote:
> Can u tell me
> what is CONNECTION_LAYER and PRIMARY_LAYER in it ?
Don't have auto-complete IDE? :) These are constants defined in
org.eclipse.gef.LayerConstants

Sebu
Previous Topic:Use HTML tag in draw2d tooltip
Next Topic:Deactiviate editor
Goto Forum:
  


Current Time: Thu Apr 25 19:41:00 GMT 2024

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

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

Back to the top