Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Again Layers
Again Layers [message #48636] Tue, 10 December 2002 09:49 Go to next message
Christof Binder is currently offline Christof BinderFriend
Messages: 13
Registered: July 2009
Junior Member
Hello,

like in another posting I want the connections _not_ to be layered on
top of my nodes, but want them behind them.

In FreeformGraphicalRootEditPart#createFigure() the layers are added,
changing the order if adding (e.g. adding the connection layer first in
a subclass) makes the connections disappear completely.

How to achieve that?

Thank you,

Chris
Re: Again Layers [message #48697 is a reply to message #48636] Tue, 10 December 2002 17:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

The primary layer is set to be opaque. It is filling white on top of your
connections. You need to make it transparent.

"Chris" <wibni@web.de> wrote in message news:3DF5B8A9.1090900@web.de...
> Hello,
>
> like in another posting I want the connections _not_ to be layered on
> top of my nodes, but want them behind them.
>
> In FreeformGraphicalRootEditPart#createFigure() the layers are added,
> changing the order if adding (e.g. adding the connection layer first in
> a subclass) makes the connections disappear completely.
>
> How to achieve that?
>
> Thank you,
>
> Chris
>
Re: Again Layers [message #48814 is a reply to message #48697] Wed, 11 December 2002 12:02 Go to previous messageGo to next message
Christof Binder is currently offline Christof BinderFriend
Messages: 13
Registered: July 2009
Junior Member
Randy Hudson wrote:
> The primary layer is set to be opaque. It is filling white on top of your
> connections. You need to make it transparent.
>

I still do not understand how to do it.
I subclasses FreeformGraphicalRootEditPart where I implemented createFigure:

FreeformViewport viewport = new FreeformViewport();
myInnerLayers = new FreeformLayeredPane();
myInnerLayers.add(new ConnectionLayer(), CONNECTION_LAYER);
FreeformLayer tmpLayer = new FreeformLayer();
// I thought this would stop overpaiting my connections:
tmpLayer.setOpaque(false);
myInnerLayers.add(tmpLayer, PRIMARY_LAYER);
myInnerLayers.add(new FreeformLayer(), HANDLE_LAYER);
myInnerLayers.add(new MyFeedbackLayer(), FEEDBACK_LAYER);
viewport.setContents(myInnerLayers);
return viewport;

Any hints?

Thanks,
Chris
Re: Again Layers [message #48844 is a reply to message #48814] Wed, 11 December 2002 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

Your contents EditPart is most likely opaque too.

"Chris" <wibni@web.de> wrote in message news:3DF72955.4000901@web.de...
> Randy Hudson wrote:
> > The primary layer is set to be opaque. It is filling white on top of
your
> > connections. You need to make it transparent.
> >
>
> I still do not understand how to do it.
> I subclasses FreeformGraphicalRootEditPart where I implemented
createFigure:
>
> FreeformViewport viewport = new FreeformViewport();
> myInnerLayers = new FreeformLayeredPane();
> myInnerLayers.add(new ConnectionLayer(), CONNECTION_LAYER);
> FreeformLayer tmpLayer = new FreeformLayer();
> // I thought this would stop overpaiting my connections:
> tmpLayer.setOpaque(false);
> myInnerLayers.add(tmpLayer, PRIMARY_LAYER);
> myInnerLayers.add(new FreeformLayer(), HANDLE_LAYER);
> myInnerLayers.add(new MyFeedbackLayer(), FEEDBACK_LAYER);
> viewport.setContents(myInnerLayers);
> return viewport;
>
> Any hints?
>
> Thanks,
> Chris
>
Re: Again Layers [message #48931 is a reply to message #48844] Wed, 11 December 2002 16:58 Go to previous messageGo to next message
Christof Binder is currently offline Christof BinderFriend
Messages: 13
Registered: July 2009
Junior Member
Randy Hudson wrote:
> Your contents EditPart is most likely opaque too.

Thanks, now the connections are in the background, behind the nodes!

But unfortunately no Drag&Drop of my nodes is possible anymore...

Anyone an idea?

Chris


>
> "Chris" <wibni@web.de> wrote in message news:3DF72955.4000901@web.de...
>
>>Randy Hudson wrote:
>>
>>>The primary layer is set to be opaque. It is filling white on top of
>>
> your
>
>>>connections. You need to make it transparent.
>>>
>>
>>I still do not understand how to do it.
>>I subclasses FreeformGraphicalRootEditPart where I implemented
>
> createFigure:
>
>>FreeformViewport viewport = new FreeformViewport();
>>myInnerLayers = new FreeformLayeredPane();
>>myInnerLayers.add(new ConnectionLayer(), CONNECTION_LAYER);
>>FreeformLayer tmpLayer = new FreeformLayer();
>>// I thought this would stop overpaiting my connections:
>>tmpLayer.setOpaque(false);
>>myInnerLayers.add(tmpLayer, PRIMARY_LAYER);
>>myInnerLayers.add(new FreeformLayer(), HANDLE_LAYER);
>>myInnerLayers.add(new MyFeedbackLayer(), FEEDBACK_LAYER);
>>viewport.setContents(myInnerLayers);
>>return viewport;
>>
>>Any hints?
>>
>>Thanks,
>>Chris
>>
>
>
>
Re: Again Layers [message #48960 is a reply to message #48931] Wed, 11 December 2002 23:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

Your primary layer isn't being targeted because it is transparent.
you will have to change containsPoint(int, int) in the figure that
represents your contents EditPart.
Note that in TransparentFigure, the Layer will *never* be targeted (it will
never return this) unless it is opaque.

"Chris" <wibni@web.de> wrote in message news:3DF76EA9.7030209@web.de...
> Randy Hudson wrote:
> > Your contents EditPart is most likely opaque too.
>
> Thanks, now the connections are in the background, behind the nodes!
>
> But unfortunately no Drag&Drop of my nodes is possible anymore...
>
> Anyone an idea?
>
> Chris
>
>
> >
> > "Chris" <wibni@web.de> wrote in message news:3DF72955.4000901@web.de...
> >
> >>Randy Hudson wrote:
> >>
> >>>The primary layer is set to be opaque. It is filling white on top of
> >>
> > your
> >
> >>>connections. You need to make it transparent.
> >>>
> >>
> >>I still do not understand how to do it.
> >>I subclasses FreeformGraphicalRootEditPart where I implemented
> >
> > createFigure:
> >
> >>FreeformViewport viewport = new FreeformViewport();
> >>myInnerLayers = new FreeformLayeredPane();
> >>myInnerLayers.add(new ConnectionLayer(), CONNECTION_LAYER);
> >>FreeformLayer tmpLayer = new FreeformLayer();
> >>// I thought this would stop overpaiting my connections:
> >>tmpLayer.setOpaque(false);
> >>myInnerLayers.add(tmpLayer, PRIMARY_LAYER);
> >>myInnerLayers.add(new FreeformLayer(), HANDLE_LAYER);
> >>myInnerLayers.add(new MyFeedbackLayer(), FEEDBACK_LAYER);
> >>viewport.setContents(myInnerLayers);
> >>return viewport;
> >>
> >>Any hints?
> >>
> >>Thanks,
> >>Chris
> >>
> >
> >
> >
>
>
Re: Again Layers [message #50398 is a reply to message #48960] Wed, 18 December 2002 15:44 Go to previous message
Christof Binder is currently offline Christof BinderFriend
Messages: 13
Registered: July 2009
Junior Member
Randy Hudson wrote:
> Your primary layer isn't being targeted because it is transparent.
> you will have to change containsPoint(int, int) in the figure that
> represents your contents EditPart.
> Note that in TransparentFigure, the Layer will *never* be targeted (it will
> never return this) unless it is opaque.

Ok, now I subclassed FreeformLayer for my contents edit part figure and
overwrote the methods findFigureAtExcluding and containsPoint, and
everything works fine.

Actually I implemented them _exactly_ like they are allready implemented
in Figure, I re-invented behaviour allready implemented in the
super-super-super-super class. Though working this seems not very
elegant.. Ist there a better way doing this?

I think having a layer that is non-opaque _and_ targetable can be a
widely used component and should be part of the Figure hierarchy.

Thanks for help!

Chris




>
> "Chris" <wibni@web.de> wrote in message news:3DF76EA9.7030209@web.de...
>
>>Randy Hudson wrote:
>>
>>>Your contents EditPart is most likely opaque too.
>>
>>Thanks, now the connections are in the background, behind the nodes!
>>
>>But unfortunately no Drag&Drop of my nodes is possible anymore...
>>
>>Anyone an idea?
>>
>>Chris
>>
>>
>>
>>>"Chris" <wibni@web.de> wrote in message news:3DF72955.4000901@web.de...
>>>
>>>
>>>>Randy Hudson wrote:
>>>>
>>>>
>>>>>The primary layer is set to be opaque. It is filling white on top of
>>>>
>>>your
>>>
>>>
>>>>>connections. You need to make it transparent.
>>>>>
>>>>
>>>>I still do not understand how to do it.
>>>>I subclasses FreeformGraphicalRootEditPart where I implemented
>>>
>>>createFigure:
>>>
>>>
>>>>FreeformViewport viewport = new FreeformViewport();
>>>>myInnerLayers = new FreeformLayeredPane();
>>>>myInnerLayers.add(new ConnectionLayer(), CONNECTION_LAYER);
>>>>FreeformLayer tmpLayer = new FreeformLayer();
>>>>// I thought this would stop overpaiting my connections:
>>>>tmpLayer.setOpaque(false);
>>>>myInnerLayers.add(tmpLayer, PRIMARY_LAYER);
>>>>myInnerLayers.add(new FreeformLayer(), HANDLE_LAYER);
>>>>myInnerLayers.add(new MyFeedbackLayer(), FEEDBACK_LAYER);
>>>>viewport.setContents(myInnerLayers);
>>>>return viewport;
>>>>
>>>>Any hints?
>>>>
>>>>Thanks,
>>>>Chris
>>>>
>>>
>>>
>>>
>>
>
>
Previous Topic:layout fot root figure
Next Topic:Dumb questions on TreeView
Goto Forum:
  


Current Time: Sat Jul 27 16:41:42 GMT 2024

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

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

Back to the top