Again Layers [message #48636] |
Tue, 10 December 2002 04:49  |
Eclipse User |
|
|
|
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 #48960 is a reply to message #48931] |
Wed, 11 December 2002 18:51   |
Eclipse User |
|
|
|
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 10:44  |
Eclipse User |
|
|
|
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
>>>>
>>>
>>>
>>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05331 seconds