How to implement DND DROP_COPY in Outline [message #77116] |
Mon, 28 April 2003 13:06  |
Eclipse User |
|
|
|
Originally posted by: remko.popma.azzurri.jp
Hi,
I'm looking for a way to do Drag & "Drop a Copy" in the Outline view of a
GEF editor.
I'm not sure if this is supported: pressing Ctrl while dragging gives the
correct feedback (the drag cursor
changes to a "plus" cursor), but dropping always results in a move, both in
the Logic example and
in my code.
Should I use TemplateTransferDropTargetListener?
I've tried adding a subclass of this class in configureOutlineViewer() (like
in the logic example):
getViewer().addDropTargetListener(new
MyTemplateTransferDropTargetListener(getViewer()));
but my listener never gets called.
I understand that if multiple drop listeners are registered, the
first one that understands the data type of the drop target event (as
determined by the
TransferDropTargetListener.isEnabled(DropTargetEvent) method) gets to handle
the drop.
Does this mean that I have to create a special data type if I want to enable
my handler?
Or should TemplateTransfer just work, and I missed something else?
(I have to admit that I don't understand the
ByteArrayTransfer.isSupportedType() implementation,
and if possible I would like to keep it that way :-)
Could anyone give me some pointers?
Thanks!
Remko Popma
|
|
|
Re: How to implement DND DROP_COPY in Outline [message #77131 is a reply to message #77116] |
Mon, 28 April 2003 13:15   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Copy on drag is not implemented yet in GEF. The fact that pressing CTRL key
does not result in the NOT cursor is a bug in GEF. We will fix this for the
2.1.1 release coming up.
You will either have to either:
1) copy TreeViewerTransfer, TreeViewerTransferDrag/DropListener, create your
own Request constant, etc. (and also wait for 2.1.1, since the current
TreeViewerDropListener will pre-empt your own listener and prevent it from
working during CTRL pressed)
OR
2) Submit these changes as patches for 2.1 (very soon) such that they might
get into 2.1.1.
OR
3) Wait for 2.2
"Remko Popma" <remko.popma@azzurri.jp> wrote in message
news:b8jn0m$9is$1@rogue.oti.com...
> Hi,
>
> I'm looking for a way to do Drag & "Drop a Copy" in the Outline view of a
> GEF editor.
> I'm not sure if this is supported: pressing Ctrl while dragging gives the
> correct feedback (the drag cursor
> changes to a "plus" cursor), but dropping always results in a move, both
in
> the Logic example and
> in my code.
>
> Should I use TemplateTransferDropTargetListener?
>
> I've tried adding a subclass of this class in configureOutlineViewer()
(like
> in the logic example):
> getViewer().addDropTargetListener(new
> MyTemplateTransferDropTargetListener(getViewer()));
> but my listener never gets called.
>
> I understand that if multiple drop listeners are registered, the
> first one that understands the data type of the drop target event (as
> determined by the
> TransferDropTargetListener.isEnabled(DropTargetEvent) method) gets to
handle
> the drop.
> Does this mean that I have to create a special data type if I want to
enable
> my handler?
> Or should TemplateTransfer just work, and I missed something else?
> (I have to admit that I don't understand the
> ByteArrayTransfer.isSupportedType() implementation,
> and if possible I would like to keep it that way :-)
>
> Could anyone give me some pointers?
>
> Thanks!
> Remko Popma
>
>
|
|
|
Re: How to implement DND DROP_COPY in Outline [message #77162 is a reply to message #77131] |
Mon, 28 April 2003 13:24   |
Eclipse User |
|
|
|
Originally posted by: remko.popma.azzurri.jp
Thank you for your reply. Very clear.
When is 2.1.1 scheduled to be released, and when is the deadline for
submitting 2.1.1 patches?
"Randy Hudson" <none@us.ibm.com> wrote in message
news:b8jnjd$a1k$1@rogue.oti.com...
> Copy on drag is not implemented yet in GEF. The fact that pressing CTRL
key
> does not result in the NOT cursor is a bug in GEF. We will fix this for
the
> 2.1.1 release coming up.
>
> You will either have to either:
>
> 1) copy TreeViewerTransfer, TreeViewerTransferDrag/DropListener, create
your
> own Request constant, etc. (and also wait for 2.1.1, since the current
> TreeViewerDropListener will pre-empt your own listener and prevent it from
> working during CTRL pressed)
>
> OR
>
> 2) Submit these changes as patches for 2.1 (very soon) such that they
might
> get into 2.1.1.
>
> OR
>
> 3) Wait for 2.2
>
> "Remko Popma" <remko.popma@azzurri.jp> wrote in message
> news:b8jn0m$9is$1@rogue.oti.com...
> > Hi,
> >
> > I'm looking for a way to do Drag & "Drop a Copy" in the Outline view of
a
> > GEF editor.
> > I'm not sure if this is supported: pressing Ctrl while dragging gives
the
> > correct feedback (the drag cursor
> > changes to a "plus" cursor), but dropping always results in a move, both
> in
> > the Logic example and
> > in my code.
> >
> > Should I use TemplateTransferDropTargetListener?
> >
> > I've tried adding a subclass of this class in configureOutlineViewer()
> (like
> > in the logic example):
> > getViewer().addDropTargetListener(new
> > MyTemplateTransferDropTargetListener(getViewer()));
> > but my listener never gets called.
> >
> > I understand that if multiple drop listeners are registered, the
> > first one that understands the data type of the drop target event (as
> > determined by the
> > TransferDropTargetListener.isEnabled(DropTargetEvent) method) gets to
> handle
> > the drop.
> > Does this mean that I have to create a special data type if I want to
> enable
> > my handler?
> > Or should TemplateTransfer just work, and I missed something else?
> > (I have to admit that I don't understand the
> > ByteArrayTransfer.isSupportedType() implementation,
> > and if possible I would like to keep it that way :-)
> >
> > Could anyone give me some pointers?
> >
> > Thanks!
> > Remko Popma
> >
> >
>
>
|
|
|
Re: How to implement DND DROP_COPY in Outline [message #77178 is a reply to message #77162] |
Mon, 28 April 2003 13:25  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Remko Popma" <remko.popma@azzurri.jp> wrote in message
news:b8jo2k$aho$1@rogue.oti.com...
> Thank you for your reply. Very clear.
> When is 2.1.1 scheduled to be released
End of June
, and when is the deadline for
> submitting 2.1.1 patches?
Hopefully the end of this week
>
>
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:b8jnjd$a1k$1@rogue.oti.com...
> > Copy on drag is not implemented yet in GEF. The fact that pressing CTRL
> key
> > does not result in the NOT cursor is a bug in GEF. We will fix this for
> the
> > 2.1.1 release coming up.
> >
> > You will either have to either:
> >
> > 1) copy TreeViewerTransfer, TreeViewerTransferDrag/DropListener, create
> your
> > own Request constant, etc. (and also wait for 2.1.1, since the current
> > TreeViewerDropListener will pre-empt your own listener and prevent it
from
> > working during CTRL pressed)
> >
> > OR
> >
> > 2) Submit these changes as patches for 2.1 (very soon) such that they
> might
> > get into 2.1.1.
> >
> > OR
> >
> > 3) Wait for 2.2
> >
> > "Remko Popma" <remko.popma@azzurri.jp> wrote in message
> > news:b8jn0m$9is$1@rogue.oti.com...
> > > Hi,
> > >
> > > I'm looking for a way to do Drag & "Drop a Copy" in the Outline view
of
> a
> > > GEF editor.
> > > I'm not sure if this is supported: pressing Ctrl while dragging gives
> the
> > > correct feedback (the drag cursor
> > > changes to a "plus" cursor), but dropping always results in a move,
both
> > in
> > > the Logic example and
> > > in my code.
> > >
> > > Should I use TemplateTransferDropTargetListener?
> > >
> > > I've tried adding a subclass of this class in configureOutlineViewer()
> > (like
> > > in the logic example):
> > > getViewer().addDropTargetListener(new
> > > MyTemplateTransferDropTargetListener(getViewer()));
> > > but my listener never gets called.
> > >
> > > I understand that if multiple drop listeners are registered, the
> > > first one that understands the data type of the drop target event (as
> > > determined by the
> > > TransferDropTargetListener.isEnabled(DropTargetEvent) method) gets to
> > handle
> > > the drop.
> > > Does this mean that I have to create a special data type if I want to
> > enable
> > > my handler?
> > > Or should TemplateTransfer just work, and I missed something else?
> > > (I have to admit that I don't understand the
> > > ByteArrayTransfer.isSupportedType() implementation,
> > > and if possible I would like to keep it that way :-)
> > >
> > > Could anyone give me some pointers?
> > >
> > > Thanks!
> > > Remko Popma
> > >
> > >
> >
> >
>
|
|
|
Powered by
FUDForum. Page generated in 0.05285 seconds