Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Drag support for SVG elements with Batik and GEF
Drag support for SVG elements with Batik and GEF [message #242689] Sun, 04 May 2008 22:31
Gerrit  is currently offline Gerrit Friend
Messages: 30
Registered: July 2009
Member
Hi everyone. I'd like to implement a simple SVG editor with Batik and GEF.
However, I'm not sure how to best fit these two pieces together.

Basically, I'd like to have an editor view with the following features:

1. I'd like to compose a new SVG document by dragging in SVG elements from
the navigator view.
2. I'd like to arrange these new elements by dragging them around within
the editor.


If managed to get the first part working, with the help of the tutorial
"Using Native Drag and Drop with GEF":

I created a GraphicalEditor with a GraphicalViewer that hooks a JSVGCanvas
to the view via SWT_AWT. I can show the DOM tree of SVG documents in the
navigator, and drag selected elements into the GraphicalViewer, where a
TransferDropTargetListener issues a GEF Command to create a new reference.
Implementing this first part was relatively smooth, and apart from the
mentioned components, I didn't have to use any additional GEF classes.

However, now I have troubles finding an approach to my second problem,
dragging within the editor. Since I didn't need any GEF classes for my
display, I have probably missed out some essential ones in my
implementation.


How do I actually capture drag events within the editor view? Can this be
done with a standard GEF Tool? Do I need to create fake EditParts on top
of my Batik canvas? Do I have to implement my own EditDomain? I would be
very happy if someone could point me to the relevant classes or
documentation.

Also, what is actually the best way to mix a Batik display into a GEF
editor? (I've seen several approaches discussed, including the use of
buffered images.)


Many thanks in advance!
Gerrit
Previous Topic:TabbedPropertySheetPage tab orientation
Next Topic:[Announce] GEF 3.4.0M7 is available
Goto Forum:
  


Current Time: Fri Apr 26 18:19:17 GMT 2024

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

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

Back to the top