Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to make a custom drag and drop tracker image
How to make a custom drag and drop tracker image [message #449221] Wed, 19 January 2005 18:12 Go to next message
Kevin is currently offline KevinFriend
Messages: 34
Registered: July 2009
Member
Hi,

I want to drag a tree item to the editor. I want to tracker image showing
the actual size of the object being dropped. Just like when you move a
control, it shows the tracker with the actual size of the object moved.

Could someone tell me how to do it or which classes I should look at?

Thanks,

Kevin
Re: How to make a custom drag and drop tracker image [message #449287 is a reply to message #449221] Thu, 20 January 2005 15:30 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
This is not currently supported with DragSource/DropTarget. This is a
requirement that I am investigating but I can not give a date when this will
be available.

You could use org.eclipse.swt.widgets.Tracker and implement your own
DragDetect listener.

"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:csm7vb$8mq$1@www.eclipse.org...
> Hi,
>
> I want to drag a tree item to the editor. I want to tracker image showing
> the actual size of the object being dropped. Just like when you move a
> control, it shows the tracker with the actual size of the object moved.
>
> Could someone tell me how to do it or which classes I should look at?
>
> Thanks,
>
> Kevin
>
>
Re: How to make a custom drag and drop tracker image [message #449308 is a reply to message #449287] Fri, 21 January 2005 01:17 Go to previous messageGo to next message
Kevin is currently offline KevinFriend
Messages: 34
Registered: July 2009
Member
Could you tell me how it can be done? I look at the DragSource.drag
function, it uses the COM.DoDragDrop to do the drag drop. I don't know
where I can set the Tracker.

Thanks.

"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:csoir4$3so$1@www.eclipse.org...
> This is not currently supported with DragSource/DropTarget. This is a
> requirement that I am investigating but I can not give a date when this
will
> be available.
>
> You could use org.eclipse.swt.widgets.Tracker and implement your own
> DragDetect listener.
>
> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> news:csm7vb$8mq$1@www.eclipse.org...
> > Hi,
> >
> > I want to drag a tree item to the editor. I want to tracker image
showing
> > the actual size of the object being dropped. Just like when you move a
> > control, it shows the tracker with the actual size of the object moved.
> >
> > Could someone tell me how to do it or which classes I should look at?
> >
> > Thanks,
> >
> > Kevin
> >
> >
>
>
Re: How to make a custom drag and drop tracker image [message #449314 is a reply to message #449308] Fri, 21 January 2005 12:02 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
You can not do it using DragSource. You must implement your own mouse event
handlers to simulate drag and drop. This is how Eclipse allows you to drag
views around the workbench. It does not use DragSource and DropTarget, it
uses DragDetect, MouseEnter, MouseMove, MouseExit events etc.


"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:cspl82$v4g$1@www.eclipse.org...
> Could you tell me how it can be done? I look at the DragSource.drag
> function, it uses the COM.DoDragDrop to do the drag drop. I don't know
> where I can set the Tracker.
>
> Thanks.
>
> "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> news:csoir4$3so$1@www.eclipse.org...
>> This is not currently supported with DragSource/DropTarget. This is a
>> requirement that I am investigating but I can not give a date when this
> will
>> be available.
>>
>> You could use org.eclipse.swt.widgets.Tracker and implement your own
>> DragDetect listener.
>>
>> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
>> news:csm7vb$8mq$1@www.eclipse.org...
>> > Hi,
>> >
>> > I want to drag a tree item to the editor. I want to tracker image
> showing
>> > the actual size of the object being dropped. Just like when you move a
>> > control, it shows the tracker with the actual size of the object moved.
>> >
>> > Could someone tell me how to do it or which classes I should look at?
>> >
>> > Thanks,
>> >
>> > Kevin
>> >
>> >
>>
>>
>
>
Re: How to make a custom drag and drop tracker image [message #449452 is a reply to message #449314] Mon, 24 January 2005 18:04 Go to previous messageGo to next message
Kevin is currently offline KevinFriend
Messages: 34
Registered: July 2009
Member
Hi Veronika,

I cannot find the DragDetect function in SWT. Could you tell me which file
I should look at?

Thanks.

Kevin

"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:csqr0n$b6k$1@www.eclipse.org...
> You can not do it using DragSource. You must implement your own mouse
event
> handlers to simulate drag and drop. This is how Eclipse allows you to
drag
> views around the workbench. It does not use DragSource and DropTarget, it
> uses DragDetect, MouseEnter, MouseMove, MouseExit events etc.
>
>
> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> news:cspl82$v4g$1@www.eclipse.org...
> > Could you tell me how it can be done? I look at the DragSource.drag
> > function, it uses the COM.DoDragDrop to do the drag drop. I don't know
> > where I can set the Tracker.
> >
> > Thanks.
> >
> > "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> > news:csoir4$3so$1@www.eclipse.org...
> >> This is not currently supported with DragSource/DropTarget. This is a
> >> requirement that I am investigating but I can not give a date when this
> > will
> >> be available.
> >>
> >> You could use org.eclipse.swt.widgets.Tracker and implement your own
> >> DragDetect listener.
> >>
> >> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> >> news:csm7vb$8mq$1@www.eclipse.org...
> >> > Hi,
> >> >
> >> > I want to drag a tree item to the editor. I want to tracker image
> > showing
> >> > the actual size of the object being dropped. Just like when you move
a
> >> > control, it shows the tracker with the actual size of the object
moved.
> >> >
> >> > Could someone tell me how to do it or which classes I should look at?
> >> >
> >> > Thanks,
> >> >
> >> > Kevin
> >> >
> >> >
> >>
> >>
> >
> >
>
>
Re: How to make a custom drag and drop tracker image [message #449479 is a reply to message #449452] Tue, 25 January 2005 12:50 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
control.addListener(SWT.DragDetect, new Listener() {
public void handleEvent(Event e) {
// code to start using Tracker.
}
});

"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:ct3dc4$mea$1@www.eclipse.org...
> Hi Veronika,
>
> I cannot find the DragDetect function in SWT. Could you tell me which
> file
> I should look at?
>
> Thanks.
>
> Kevin
>
> "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> news:csqr0n$b6k$1@www.eclipse.org...
>> You can not do it using DragSource. You must implement your own mouse
> event
>> handlers to simulate drag and drop. This is how Eclipse allows you to
> drag
>> views around the workbench. It does not use DragSource and DropTarget,
>> it
>> uses DragDetect, MouseEnter, MouseMove, MouseExit events etc.
>>
>>
>> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
>> news:cspl82$v4g$1@www.eclipse.org...
>> > Could you tell me how it can be done? I look at the DragSource.drag
>> > function, it uses the COM.DoDragDrop to do the drag drop. I don't know
>> > where I can set the Tracker.
>> >
>> > Thanks.
>> >
>> > "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
>> > news:csoir4$3so$1@www.eclipse.org...
>> >> This is not currently supported with DragSource/DropTarget. This is a
>> >> requirement that I am investigating but I can not give a date when
>> >> this
>> > will
>> >> be available.
>> >>
>> >> You could use org.eclipse.swt.widgets.Tracker and implement your own
>> >> DragDetect listener.
>> >>
>> >> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
>> >> news:csm7vb$8mq$1@www.eclipse.org...
>> >> > Hi,
>> >> >
>> >> > I want to drag a tree item to the editor. I want to tracker image
>> > showing
>> >> > the actual size of the object being dropped. Just like when you
>> >> > move
> a
>> >> > control, it shows the tracker with the actual size of the object
> moved.
>> >> >
>> >> > Could someone tell me how to do it or which classes I should look
>> >> > at?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Kevin
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Previous Topic:JFace Table - truncated image size in ITableLabelProvider
Next Topic:activeEditorPart is always null (setActivePage)
Goto Forum:
  


Current Time: Thu Mar 28 08:55:03 GMT 2024

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

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

Back to the top