Drag n Drop then Connect?

Hi,

I’ve been playing with the drag and drop functionality in Vaadin with a view to rewriting a clunky slow applet.

The applet allows the user drag components onto a canvas and move them around.

Vaadin will do this job very well and be faster and slicker.

The applet also allows the user to connect the components with a line that adjusts when the components are dragged again.

I’ve looked through the book of vaadin and the forum and haven’t seen any reference to something like this.

Is it time to write my own widget or is this even possible?

I don’t need to record or animate the line draw just what it connects.

I’d love to replace the applet with a Vaadin application

any tips would be greatly appreciated

kind regards,

Patrick.
11315.png

You could do that with a purely server-side approach by generating the connector lines as Embedded images that you put in an AbsoluteLayout where the draggable components are. You need to make a StreamResource that generates the connector images.

I think you could also use the
GWT Graphics
or
CanvasWidget
add-on components to draw the connectors. Using them might be easier than implementing the line drawing yourself.

Thanks Marko

The add ons look like they’ll do the job very well…

kiitos! kiitos!