[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: how to Identify the model present on the editor ?

In the context of GEF the targetting mechanism is handled behind the scenes.
You can handle these targetting scenarios by installing appropriate
EditPolicies on your EditPart.  The editpolicies installed would handle
requests for add (REQ_ADD), orphan (REQ_ORPHAN).  Orphan requests means the
receiver is being moved from it's current parent.  @see ComponentEditPolicy.

If your working in the context of Draw2d, then there are api's on the
containing Figure you could use Figure#findFigureAt(...)

-Steve

"Spike" <spike.m@xxxxxxxxx> wrote in message
news:3ea607fcf457c0aeb23919204c85e14f$1@xxxxxxxxxxxxxxxxxx
> Hi i have a issue when i drag n drop a figure on to the editor.
> The question is how to identify the figure/model which is below the figure
> which iam droping on it. (no parent child relationship)
>
> Lets say 4 example there is a Square already drawn on the editor, and if i
> drop a circle on it , how do we trace which square object is present
> beneath the circle which i have droped (If there are  2 or 3 Squares
> already present on the editor).
>
> Thanks
> Spike
>
>
>
>