GEF Logic Example Drag and Drop [message #159342] |
Wed, 24 November 2004 11:04  |
Eclipse User |
|
|
|
Originally posted by: pankajsanghi.hotmail.com
hi all,
This is with reference to drag and drop functionality implemented in Logic
Example.
I understand that whenever a component(for instance OR gate) is dropped
from the palette on the canvas, then
LogicTemplateTransferDropTargetListener gets activated. In the getFactory
method of this class, a template is passed and a CretionFactory class
object is returned by it.
Can you please tell me the flow being followed for the call of this
getFactory() method.
In my case, I have a palette with three components say X, Y, Z. As i drag
and drop any of these components, every time, an object of only X is
created and fifure corresponding to X component appears on the canvas. i
understand this is because the coresponding template name is coming same
as that of X for all the components.........but i am not able to track why
the same template object is being passed to getFactory method for all the
three components despite the fact that I have defined different template
constants for all of the in my TemplateConstants class.
Can you pl help me solve the issue??
thanks and regards
Pankaj Sanghi
|
|
|
Re: GEF Logic Example Drag and Drop [message #159453 is a reply to message #159342] |
Sat, 27 November 2004 14:39  |
Eclipse User |
|
|
|
"Pankaj Sanghi" <pankajsanghi@hotmail.com> wrote in message
news:co2bdk$esm$1@www.eclipse.org...
> hi all,
>
> This is with reference to drag and drop functionality implemented in Logic
> Example.
>
> I understand that whenever a component(for instance OR gate) is dropped
> from the palette on the canvas, then
> LogicTemplateTransferDropTargetListener gets activated. In the getFactory
> method of this class, a template is passed and a CretionFactory class
> object is returned by it.
>
> Can you please tell me the flow being followed for the call of this
> getFactory() method.
Doesn't setting a breakpoint in that method serve that purpose? The
template, in this case, is derived from the TemplateTransfer singleton.
TemplateTransferDragSourceListener sets the template on that singleton in
its dragStart() method.
>
> In my case, I have a palette with three components say X, Y, Z. As i drag
> and drop any of these components, every time, an object of only X is
> created and fifure corresponding to X component appears on the canvas. i
> understand this is because the coresponding template name is coming same
> as that of X for all the components.........but i am not able to track why
> the same template object is being passed to getFactory method for all the
> three components despite the fact that I have defined different template
> constants for all of the in my TemplateConstants class.
>
> Can you pl help me solve the issue??
>
> thanks and regards
>
> Pankaj Sanghi
>
|
|
|
Powered by
FUDForum. Page generated in 0.06468 seconds