Home » Eclipse Projects » GEF » z order
| |
Re: z order [message #129805 is a reply to message #129734] |
Thu, 29 April 2004 15:53 |
steven melzer Messages: 38 Registered: July 2009 |
Member |
|
|
jody (and all),
thanks for the fast feedback. but i do not believe i was clear. let me
give an example:
i have 3 figures on my display: call them A, B, and C. when they are
added to the model, they show up on the display fine. when you put them
near each other, they overlap each other. so, you see half of A, part of
B, and all of C.
i want to move C back. there are two options: "send to back" and "send
backwards". "send to back" will put C as the first item in the child list
and give him the lowest Z-order on the display. but "send backwards"
should just send C behind A and B because they are touching it, but not
make it the first child on the display. this gives C priority over over
things that may get moved or added later.
my problem is how to determine when C is selected, that it is touching A
and B.
thoughts?
thanks,
steve
Jody Schofield wrote:
> I did this by changing the order of the model objects. I think GEF
> refreshes the order of the figures based on the order of the model. I got
> the model object from the selection and created a command to move it
> accordingly. Worked fine for me. :)
> Good-luck!
> "Steven Melzer" <smelzer@paymentech.com> wrote in message
> news:c6qrab$s5d$1@eclipse.org...
> > all,
> >
> > i am looking for a good example of re-ordering children to create the
> > "send backwards/send to back/bring forwards/bring to front" type z order
> > support.
> >
> > the "send to back" and "bring to front" seem like simple things since they
> > would just be the beginning and end of the children list, but "send
> > backwards" and "bring forwards" require you to know all the figures the
> > selected figure is touching. how do you do this?
> >
> > thanks in advance,
> > steve
> >
|
|
|
Re: z order [message #129855 is a reply to message #129805] |
Thu, 29 April 2004 19:15 |
Pratik Shah Messages: 1077 Registered: July 2009 |
Senior Member |
|
|
Did you try using Rectangle.intersects() to see if the bounds of A, B and C
intersect?
"Steven Melzer" <smelzer@paymentech.com> wrote in message
news:c6r8dh$egl$1@eclipse.org...
> jody (and all),
>
> thanks for the fast feedback. but i do not believe i was clear. let me
> give an example:
>
> i have 3 figures on my display: call them A, B, and C. when they are
> added to the model, they show up on the display fine. when you put them
> near each other, they overlap each other. so, you see half of A, part of
> B, and all of C.
>
> i want to move C back. there are two options: "send to back" and "send
> backwards". "send to back" will put C as the first item in the child list
> and give him the lowest Z-order on the display. but "send backwards"
> should just send C behind A and B because they are touching it, but not
> make it the first child on the display. this gives C priority over over
> things that may get moved or added later.
>
> my problem is how to determine when C is selected, that it is touching A
> and B.
>
> thoughts?
>
> thanks,
> steve
>
> Jody Schofield wrote:
>
> > I did this by changing the order of the model objects. I think GEF
> > refreshes the order of the figures based on the order of the model. I
got
> > the model object from the selection and created a command to move it
> > accordingly. Worked fine for me. :)
>
> > Good-luck!
>
>
> > "Steven Melzer" <smelzer@paymentech.com> wrote in message
> > news:c6qrab$s5d$1@eclipse.org...
> > > all,
> > >
> > > i am looking for a good example of re-ordering children to create the
> > > "send backwards/send to back/bring forwards/bring to front" type z
order
> > > support.
> > >
> > > the "send to back" and "bring to front" seem like simple things since
they
> > > would just be the beginning and end of the children list, but "send
> > > backwards" and "bring forwards" require you to know all the figures
the
> > > selected figure is touching. how do you do this?
> > >
> > > thanks in advance,
> > > steve
> > >
>
>
|
|
|
Re: z order [message #130321 is a reply to message #129855] |
Tue, 04 May 2004 02:33 |
steven melzer Messages: 38 Registered: July 2009 |
Member |
|
|
i will try this. thanks.
steve
Pratik Shah wrote:
> Did you try using Rectangle.intersects() to see if the bounds of A, B and C
> intersect?
> "Steven Melzer" <smelzer@paymentech.com> wrote in message
> news:c6r8dh$egl$1@eclipse.org...
> > jody (and all),
> >
> > thanks for the fast feedback. but i do not believe i was clear. let me
> > give an example:
> >
> > i have 3 figures on my display: call them A, B, and C. when they are
> > added to the model, they show up on the display fine. when you put them
> > near each other, they overlap each other. so, you see half of A, part of
> > B, and all of C.
> >
> > i want to move C back. there are two options: "send to back" and "send
> > backwards". "send to back" will put C as the first item in the child list
> > and give him the lowest Z-order on the display. but "send backwards"
> > should just send C behind A and B because they are touching it, but not
> > make it the first child on the display. this gives C priority over over
> > things that may get moved or added later.
> >
> > my problem is how to determine when C is selected, that it is touching A
> > and B.
> >
> > thoughts?
> >
> > thanks,
> > steve
> >
> > Jody Schofield wrote:
> >
> > > I did this by changing the order of the model objects. I think GEF
> > > refreshes the order of the figures based on the order of the model. I
> got
> > > the model object from the selection and created a command to move it
> > > accordingly. Worked fine for me. :)
> >
> > > Good-luck!
> >
> >
> > > "Steven Melzer" <smelzer@paymentech.com> wrote in message
> > > news:c6qrab$s5d$1@eclipse.org...
> > > > all,
> > > >
> > > > i am looking for a good example of re-ordering children to create the
> > > > "send backwards/send to back/bring forwards/bring to front" type z
> order
> > > > support.
> > > >
> > > > the "send to back" and "bring to front" seem like simple things since
> they
> > > > would just be the beginning and end of the children list, but "send
> > > > backwards" and "bring forwards" require you to know all the figures
> the
> > > > selected figure is touching. how do you do this?
> > > >
> > > > thanks in advance,
> > > > steve
> > > >
> >
> >
|
|
|
Goto Forum:
Current Time: Sat Jul 27 16:30:38 GMT 2024
Powered by FUDForum. Page generated in 0.03223 seconds
|