简体   繁体   English

在GWT FlexTable中拖放

[英]Drag and Drop in a GWT FlexTable

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 . 我正在研究GWT项目中的FlexTable功能,我需要将小部件FlexTableFlexTable

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. 我在AbsolutePanel等中看到了DnD的一些例子,我对它进行了研究,但我没有找到有关上述问题的任何信息。

Any help will be appriciated. 任何帮助都会得到满足。

Do you consider the drag and drop plugin of gwtquery ? 你考虑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 查看文档: 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 在以下示例中: http//gwtquery-plugins.googlecode.com/svn/trunk/droppable/demo/GwtSimpleSample/GwtSimpleSample.html

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 . 但不是GWTQuery ,我只使用GWT

  1. I moved the FlexTable into a AbsolutePanel to manipulate the dragged objects from the FlexTable cells 我将FlexTable移动到AbsolutePanel以操纵FlexTable单元格中的拖动对象
  2. I used java events, mouse events and handlers 我使用了java事件,鼠标事件和处理程序
  3. I used FocusPanel to map the events to 我使用FocusPanel将事件映射到
  4. Manipulated the FlexTable in a lot of sections of event handling in dragging and dropping objects 在拖放对象中的事件处理的许多部分中操纵FlexTable

Working with DnD in AbsolutePanel is a thing and working with FlexTable is another: AbsolutePanel使用DnD是一件事,使用FlexTable是另一回事:
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**. FlexTable维护DnD是非常困难的,因为它有很多关于行和列的操作,添加定位器 ,删除和添加小部件,在A **中是很多痛苦。 but worth trying it. 但值得一试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM