Drag and Drop in a GWT FlexTable
-
03-06-2021 - |
Pregunta
I'm working on a drag'n'drop functionality in a GWT project and I need to do widgets drag'n'droping onto a FlexTable
.
I saw some examples on DnD within AbsolutePanel
... etc, and I did researches on it, but I didn't find any information on the above mentioned problem.
Any help will be appriciated.
Solución 2
In a matter of fact I finished coding, and it works super. It took me one whole week! But not with GWTQuery
, I used only GWT
.
- I moved the
FlexTable
into aAbsolutePanel
to manipulate the dragged objects from theFlexTable
cells - I used java events, mouse events and handlers
- I used
FocusPanel
to map the events to - Manipulated the FlexTable in a lot of sections of event handling in dragging and dropping objects
Otros consejos
Do you consider the drag and drop plugin of gwtquery ?
It offers the possibility to make any widget (the new cell widgets included) draggable and/or droppable easily and it is fully configurable.
Take a look a the doc : http://code.google.com/p/gwtquery-plugins/wiki/DragAndDropPluginForGWTDeveloppers
and at the examples : http://gwtquery-plugins.googlecode.com/svn/trunk/droppable/demo/GwtSimpleSample/GwtSimpleSample.html
Working with DnD
in AbsolutePanel
is a thing and working with FlexTable
is another:
It is very difficult to maintain DnD
in FlexTable
since it has a lot of manipulation things to be done concerning rows and columns, on adding positioners, removing and adding widgets, is a lot of pain in the A**. but worth trying it.