Menu

Drag and drop from/to SWT

Help
2009-04-06
2013-04-26
  • Nobody/Anonymous

    Hi,

    this is a great plugin and helps me a lot with my current RCP project.

    In order to fully integrate Java3D into my RCP app, I do also need DnD support in both directions. Has anyone an idea how to implement this? Presumably I will need to provide DND for my AWT View using AWT API.

    Help would be greatly appreciated...

    Thanks,
    Jürgen

     
    • Aleksandar Ristovski

      That is very interesting and I see how it can be useful.

      Unfortunately, I don't know how would that be done :(. Would you select a 3d object, start dragging it until you reach the edge of rendering view, or would you just create a dragging icon that would move? I am not sure how well would that work while rendering is active.

      Maybe (just maybe, I am thinking aloud) you could temporarily stop rendering, and then treat java3d rendering view like "ordinary" 2d image (maybe first render into a bitmap then display that bitmap with which you do drag and drop)?

      I don't know the solution, but I am very interested in hearing about how you did it.

      Thanks,

      Aleksandar

       
      • Nobody/Anonymous

        > Would you select a 3d object, start dragging it until you reach the edge of
        > rendering view, or would you just create a dragging icon that would move?

        Very good point. My idea is to drag the 3d object until it reaches the edge of the rendering view. This seems naturally to me and is also neccessary if you want to have drag-and-drop withing the 3d rendering view itself. For example if you want to make a scheduler where you can organize your tasks and drag them from one weekday to another, you want to have DnD-ability within the 3d rendering view. But then if you want to drag a task to somewhere else in the application, you can drag it until it reaches the edge, then it diappears from the 3d component and only a dragging icon is shown.

        In a newsgroup I found:

        You will need to provide DND for your AWT View using AWT API but it must support the same transfer type that the Project Explorer provides.

        So far this is a bit cryptic for me, but I will continue to investigate. If you want, I can keep you updated.

        Regards,
        Jürgen

         
    • Aleksandar Ristovski

      Hello Jürgen,

      That is cryptic for me too. I had done DND on Win32 application long time ago, but haven't done that in Eclipse.

      Let me know when you solve it.

      Thanks,

      Aleksandar

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.