Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » setting Z-order/depth-order of figures
setting Z-order/depth-order of figures [message #148309] Mon, 23 August 2004 11:58 Go to next message
Bernd Kolb is currently offline Bernd KolbFriend
Messages: 57
Registered: July 2009
Member
Hi,

If one figure (e.g label) lies inside another figure (only due to the
physical coordinates) which figure is selected
when mouse click is clicked at location b?

Does the z-order depends on the creation order of the editparts hence
figures?

Is there a possibility to manually change or set or specify the z-order of
the figures?


|-----------------------|
| |------| |
| a | b | |
| |------| |
|-----------------------|


Actual situation is as follows:

model A is container for model B & the figure of model B should be rendered
inside figure of model A
but i still want to select model B when clicked.

Best Regards.
Re: setting Z-order/depth-order of figures [message #148312 is a reply to message #148309] Mon, 23 August 2004 13:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: word-up.gmx.de

Hi,

I don't know how to manipulate the "z-order", but you won't have any
problems in your actual situation.
If model A contains model B, then the edit part for A should be the father
of the edit part of B.

regards,

Max

Bernd Kolb wrote:

> Hi,

> If one figure (e.g label) lies inside another figure (only due to the
> physical coordinates) which figure is selected
> when mouse click is clicked at location b?

> Does the z-order depends on the creation order of the editparts hence
> figures?

> Is there a possibility to manually change or set or specify the z-order of
> the figures?


> |-----------------------|
> | |------| |
> | a | b | |
> | |------| |
> |-----------------------|


> Actual situation is as follows:

> model A is container for model B & the figure of model B should be rendered
> inside figure of model A
> but i still want to select model B when clicked.

> Best Regards.
Re: setting Z-order/depth-order of figures [message #148350 is a reply to message #148309] Mon, 23 August 2004 19:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The editparts should be contained too. Children will always be on top of
their parent.

"Bernd Kolb" <b.kolb@kolbware.de> wrote in message
news:cgcm05$s9m$1@eclipse.org...
> Hi,
>
> If one figure (e.g label) lies inside another figure (only due to the
> physical coordinates) which figure is selected
> when mouse click is clicked at location b?
>
> Does the z-order depends on the creation order of the editparts hence
> figures?
>
> Is there a possibility to manually change or set or specify the z-order of
> the figures?
>
>
> |-----------------------|
> | |------| |
> | a | b | |
> | |------| |
> |-----------------------|
>
>
> Actual situation is as follows:
>
> model A is container for model B & the figure of model B should be
rendered
> inside figure of model A
> but i still want to select model B when clicked.
>
> Best Regards.
>
>
>
>
>
Re: setting Z-order/depth-order of figures [message #148403 is a reply to message #148350] Tue, 24 August 2004 12:35 Go to previous messageGo to next message
Bernd Kolb is currently offline Bernd KolbFriend
Messages: 57
Registered: July 2009
Member
Hi,
Model A is container for mobel B
As recommended by you, I should add editpart B to edit part A aswell,
to have the same heirarchy in the editparts as in the models.

Now here is the question.
while instantiating a new model B should it only be added to the
list of children in Model A
OR should it be added to the main contents list
(EditPartViewer::SetContents(..contents..));
From what i Understand
If the model B was added to the main contents then the editpartfactory will
create the edit part for it
during refreshChildren() and then the new edit part will be added to
RootEditpart
(and Not to the parent edit part that is Edit Part A)

If the model B was added to the list of children in model A we have to
manually create an edit part for it
add it to the EditPart A and then add the information to EditPartRegistry

But, in the next refreshChildren(). The model for the EditPart B will not be
found in the
main Contents and so it will be deleted.
So what do I do?



Regards





"Randy Hudson" <none@us.ibm.com> schrieb im Newsbeitrag
news:cgdh97$e5h$1@eclipse.org...
> The editparts should be contained too. Children will always be on top of
> their parent.
>
> "Bernd Kolb" <b.kolb@kolbware.de> wrote in message
> news:cgcm05$s9m$1@eclipse.org...
> > Hi,
> >
> > If one figure (e.g label) lies inside another figure (only due to the
> > physical coordinates) which figure is selected
> > when mouse click is clicked at location b?
> >
> > Does the z-order depends on the creation order of the editparts hence
> > figures?
> >
> > Is there a possibility to manually change or set or specify the z-order
of
> > the figures?
> >
> >
> > |-----------------------|
> > | |------| |
> > | a | b | |
> > | |------| |
> > |-----------------------|
> >
> >
> > Actual situation is as follows:
> >
> > model A is container for model B & the figure of model B should be
> rendered
> > inside figure of model A
> > but i still want to select model B when clicked.
> >
> > Best Regards.
> >
> >
> >
> >
> >
>
>
Re: setting Z-order/depth-order of figures [message #148418 is a reply to message #148403] Tue, 24 August 2004 14:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

No, editpart A should be listening for changes in it children property.
when it changes, it should call refreshchildren on itself, which results in
getModleChildren() being called on itself, and B getting created and added
to A. It does *not* involve the viewer, contents, or root.

"Bernd Kolb" <b.kolb@kolbware.de> wrote in message
news:cgfcgf$3to$1@eclipse.org...
> Hi,
> Model A is container for mobel B
> As recommended by you, I should add editpart B to edit part A aswell,
> to have the same heirarchy in the editparts as in the models.
>
> Now here is the question.
> while instantiating a new model B should it only be added to the
> list of children in Model A
> OR should it be added to the main contents list
> (EditPartViewer::SetContents(..contents..));
> From what i Understand
> If the model B was added to the main contents then the editpartfactory
will
> create the edit part for it
> during refreshChildren() and then the new edit part will be added to
> RootEditpart
> (and Not to the parent edit part that is Edit Part A)
>
> If the model B was added to the list of children in model A we have to
> manually create an edit part for it
> add it to the EditPart A and then add the information to EditPartRegistry
>
> But, in the next refreshChildren(). The model for the EditPart B will not
be
> found in the
> main Contents and so it will be deleted.
> So what do I do?
>
>
>
> Regards
>
>
>
>
>
> "Randy Hudson" <none@us.ibm.com> schrieb im Newsbeitrag
> news:cgdh97$e5h$1@eclipse.org...
> > The editparts should be contained too. Children will always be on top
of
> > their parent.
> >
> > "Bernd Kolb" <b.kolb@kolbware.de> wrote in message
> > news:cgcm05$s9m$1@eclipse.org...
> > > Hi,
> > >
> > > If one figure (e.g label) lies inside another figure (only due to the
> > > physical coordinates) which figure is selected
> > > when mouse click is clicked at location b?
> > >
> > > Does the z-order depends on the creation order of the editparts hence
> > > figures?
> > >
> > > Is there a possibility to manually change or set or specify the
z-order
> of
> > > the figures?
> > >
> > >
> > > |-----------------------|
> > > | |------| |
> > > | a | b | |
> > > | |------| |
> > > |-----------------------|
> > >
> > >
> > > Actual situation is as follows:
> > >
> > > model A is container for model B & the figure of model B should be
> > rendered
> > > inside figure of model A
> > > but i still want to select model B when clicked.
> > >
> > > Best Regards.
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
Re: setting Z-order/depth-order of figures [message #148433 is a reply to message #148403] Tue, 24 August 2004 15:07 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
"Bernd Kolb" <b.kolb@kolbware.de> wrote in message
news:cgfcgf$3to$1@eclipse.org...
> Hi,
> Model A is container for mobel B
> As recommended by you, I should add editpart B to edit part A aswell,
> to have the same heirarchy in the editparts as in the models.
>
> Now here is the question.
> while instantiating a new model B should it only be added to the
> list of children in Model A
> OR should it be added to the main contents list
> (EditPartViewer::SetContents(..contents..));

It should be added as a child of A.

> From what i Understand
> If the model B was added to the main contents then the editpartfactory
will
> create the edit part for it
> during refreshChildren() and then the new edit part will be added to
> RootEditpart
> (and Not to the parent edit part that is Edit Part A)

That is correct.

>
> If the model B was added to the list of children in model A we have to
> manually create an edit part for it
> add it to the EditPart A and then add the information to EditPartRegistry
>

Not true. This will be done for you just like you described above (if model
B was a child of the main contents).

> But, in the next refreshChildren(). The model for the EditPart B will not
be
> found in the
> main Contents and so it will be deleted.
> So what do I do?

The correct way is to have Model A's EditPart's getModelChildren() method
return a list that includes model B. Then an EditPart will be created for
it, and won't be removed until model B is no longer a child of A.

>
>
> Regards
>
>
>
>
>
> "Randy Hudson" <none@us.ibm.com> schrieb im Newsbeitrag
> news:cgdh97$e5h$1@eclipse.org...
> > The editparts should be contained too. Children will always be on top
of
> > their parent.
> >
> > "Bernd Kolb" <b.kolb@kolbware.de> wrote in message
> > news:cgcm05$s9m$1@eclipse.org...
> > > Hi,
> > >
> > > If one figure (e.g label) lies inside another figure (only due to the
> > > physical coordinates) which figure is selected
> > > when mouse click is clicked at location b?
> > >
> > > Does the z-order depends on the creation order of the editparts hence
> > > figures?
> > >
> > > Is there a possibility to manually change or set or specify the
z-order
> of
> > > the figures?
> > >
> > >
> > > |-----------------------|
> > > | |------| |
> > > | a | b | |
> > > | |------| |
> > > |-----------------------|
> > >
> > >
> > > Actual situation is as follows:
> > >
> > > model A is container for model B & the figure of model B should be
> > rendered
> > > inside figure of model A
> > > but i still want to select model B when clicked.
> > >
> > > Best Regards.
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
Re: setting Z-order/depth-order of figures [message #148552 is a reply to message #148433] Wed, 25 August 2004 13:17 Go to previous messageGo to next message
Bernd Kolb is currently offline Bernd KolbFriend
Messages: 57
Registered: July 2009
Member
Hi,

Thank you for your replies.

Should Figure of EditPart B also be added to Figure of EditPart A?


Regards.
Re: setting Z-order/depth-order of figures [message #148598 is a reply to message #148552] Wed, 25 August 2004 14:27 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Yes, this happens automatically in addChild(EditPart, index), which calls
addChildVisual().

"Bernd Kolb" <b.kolb@kolbware.de> wrote in message
news:cgi3b8$ee4$1@eclipse.org...
> Hi,
>
> Thank you for your replies.
>
> Should Figure of EditPart B also be added to Figure of EditPart A?
>
>
> Regards.
>
>
Previous Topic:help--Is there a sample WYSIWYG text editor based on GEF available?
Next Topic:Global summary view
Goto Forum:
  


Current Time: Wed Jan 15 20:31:58 GMT 2025

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

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

Back to the top