Skip to main content



      Home
Home » Eclipse Projects » GEF » Why the TreeViewerTransferDragListener and TreeViewerTransfer not public?
Why the TreeViewerTransferDragListener and TreeViewerTransfer not public? [message #171170] Wed, 09 March 2005 15:02 Go to next message
Eclipse UserFriend
Originally posted by: kevinlouisnospam.hotmail.com

I want to create a Outline window like view and put the GEF TreeViewer
inside. I want to allow dragging from that tree to my editor. However, I
find out the TreeViewerTransferDragListener related classes are not public
and I cannot add it to my Graphical Viewer.

Does the TreeViewer allow DND within itself only? Why can't it be like the
TemplateTransferDragTargetListener used for the Palette?
Re: Why the TreeViewerTransferDragListener and TreeViewerTransfer not public? [message #171178 is a reply to message #171170] Wed, 09 March 2005 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kevinlouisnospam.hotmail.com

After reading the TreeViewerTransferDropListener source codes, it seems it
is used for the DND within the Tree. To allow DND to other editor or view,
I think I need to create my subclass of the TreeViewer, call
addDragTargetListener and addDropTargetListener to add my own
TransferDragSourceListener and TransferDropTargetListener.

Thanks,

Kevin

"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:d0nkp1$r18$1@www.eclipse.org...
> I want to create a Outline window like view and put the GEF TreeViewer
> inside. I want to allow dragging from that tree to my editor. However, I
> find out the TreeViewerTransferDragListener related classes are not public
> and I cannot add it to my Graphical Viewer.
>
> Does the TreeViewer allow DND within itself only? Why can't it be like
the
> TemplateTransferDragTargetListener used for the Palette?
>
>
Re: Why the TreeViewerTransferDragListener and TreeViewerTransfer not public? [message #171186 is a reply to message #171178] Wed, 09 March 2005 17:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

no reason to subclass just to call public methods

"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:d0nrcf$sbc$1@www.eclipse.org...
> After reading the TreeViewerTransferDropListener source codes, it seems it
> is used for the DND within the Tree. To allow DND to other editor or
> view,
> I think I need to create my subclass of the TreeViewer, call
> addDragTargetListener and addDropTargetListener to add my own
> TransferDragSourceListener and TransferDropTargetListener.
>
> Thanks,
>
> Kevin
>
> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> news:d0nkp1$r18$1@www.eclipse.org...
>> I want to create a Outline window like view and put the GEF TreeViewer
>> inside. I want to allow dragging from that tree to my editor. However,
>> I
>> find out the TreeViewerTransferDragListener related classes are not
>> public
>> and I cannot add it to my Graphical Viewer.
>>
>> Does the TreeViewer allow DND within itself only? Why can't it be like
> the
>> TemplateTransferDragTargetListener used for the Palette?
>>
>>
>
>
Re: Why the TreeViewerTransferDragListener and TreeViewerTransfer not public? [message #171299 is a reply to message #171186] Thu, 10 March 2005 22:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kevinlouisnospam.hotmail.com

What public methods you mean?

I need to DND to other viewer or editor. But the
TreeViewerTransferDropTargetListener checks it is in the same Viewer and it
does not allow the drop outside.

e.g. In the handleDragOver, it checks if the getViewer is the same between
the dragSource and dropTarget.

protected void handleDragOver() {
if (TreeViewerTransfer.getInstance().getViewer() != getViewer()) {
getCurrentEvent().detail = DND.DROP_NONE;
return;
}
getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND;
super.handleDragOver();
}



"Randy Hudson" <none@us.ibm.com> wrote in message
news:d0nrpk$uha$1@www.eclipse.org...
> no reason to subclass just to call public methods
>
> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> news:d0nrcf$sbc$1@www.eclipse.org...
> > After reading the TreeViewerTransferDropListener source codes, it seems
it
> > is used for the DND within the Tree. To allow DND to other editor or
> > view,
> > I think I need to create my subclass of the TreeViewer, call
> > addDragTargetListener and addDropTargetListener to add my own
> > TransferDragSourceListener and TransferDropTargetListener.
> >
> > Thanks,
> >
> > Kevin
> >
> > "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> > news:d0nkp1$r18$1@www.eclipse.org...
> >> I want to create a Outline window like view and put the GEF TreeViewer
> >> inside. I want to allow dragging from that tree to my editor.
However,
> >> I
> >> find out the TreeViewerTransferDragListener related classes are not
> >> public
> >> and I cannot add it to my Graphical Viewer.
> >>
> >> Does the TreeViewer allow DND within itself only? Why can't it be like
> > the
> >> TemplateTransferDragTargetListener used for the Palette?
> >>
> >>
> >
> >
>
>
Re: Why the TreeViewerTransferDragListener and TreeViewerTransfer not public? [message #171378 is a reply to message #171299] Fri, 11 March 2005 10:39 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The adding of dragsourcetransfers and droptargettransfers is public

"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:d0r2i4$994$1@www.eclipse.org...
> What public methods you mean?
>
> I need to DND to other viewer or editor. But the
> TreeViewerTransferDropTargetListener checks it is in the same Viewer and
> it
> does not allow the drop outside.
>
> e.g. In the handleDragOver, it checks if the getViewer is the same between
> the dragSource and dropTarget.
>
> protected void handleDragOver() {
> if (TreeViewerTransfer.getInstance().getViewer() != getViewer()) {
> getCurrentEvent().detail = DND.DROP_NONE;
> return;
> }
> getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND;
> super.handleDragOver();
> }
>
>
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:d0nrpk$uha$1@www.eclipse.org...
>> no reason to subclass just to call public methods
>>
>> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
>> news:d0nrcf$sbc$1@www.eclipse.org...
>> > After reading the TreeViewerTransferDropListener source codes, it seems
> it
>> > is used for the DND within the Tree. To allow DND to other editor or
>> > view,
>> > I think I need to create my subclass of the TreeViewer, call
>> > addDragTargetListener and addDropTargetListener to add my own
>> > TransferDragSourceListener and TransferDropTargetListener.
>> >
>> > Thanks,
>> >
>> > Kevin
>> >
>> > "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
>> > news:d0nkp1$r18$1@www.eclipse.org...
>> >> I want to create a Outline window like view and put the GEF TreeViewer
>> >> inside. I want to allow dragging from that tree to my editor.
> However,
>> >> I
>> >> find out the TreeViewerTransferDragListener related classes are not
>> >> public
>> >> and I cannot add it to my Graphical Viewer.
>> >>
>> >> Does the TreeViewer allow DND within itself only? Why can't it be
>> >> like
>> > the
>> >> TemplateTransferDragTargetListener used for the Palette?
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Previous Topic:Survey on Understanding Code
Next Topic:Porting Touchgraph to SWT/Draw2D/GEF
Goto Forum:
  


Current Time: Wed Nov 05 06:29:27 EST 2025

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

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

Back to the top