Two classes of children on two separate layers [message #85144] |
Wed, 25 June 2003 12:48 |
Eclipse User |
|
|
|
Originally posted by: forster.fmi.uni-passau.de
Hi,
One of my EditParts has two kinds of children, say Type A and B.
Children of type A should always be drawn behind those of type B. How to
model this?
I tried to compose the parent figure of two layers and then insert the
child figures into the layers, but this conflicts with
GraphicalEditPart.getContentPane where a single Figure containing the
children is needed.
Is is necessary to introduce new intermediate EditParts?
Mike
|
|
|
Re: Two classes of children on two separate layers [message #85202 is a reply to message #85144] |
Wed, 25 June 2003 14:21 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Michael Forster" <forster@fmi.uni-passau.de> wrote in message
news:bdc5mq$umu$1@rogue.oti.com...
> Hi,
>
> One of my EditParts has two kinds of children, say Type A and B.
> Children of type A should always be drawn behind those of type B. How to
> model this?
>
> I tried to compose the parent figure of two layers and then insert the
> child figures into the layers, but this conflicts with
> GraphicalEditPart.getContentPane where a single Figure containing the
> children is needed.
>
> Is is necessary to introduce new intermediate EditParts?
Perhaps, and the intermediate editparts can be made non-selectable.
OR, define a second structural relationship other than "children", and write
similar code to refreshChildren(), etc.
OR, override addChildVisual() and removeChildVisual(), so that the
appropriate content pane is used per child. Note that you will have to
massage the index, or you could ignore the index completely.
Maybe try the last option first.
|
|
|
Powered by
FUDForum. Page generated in 0.02715 seconds