Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » drag and drop support(tables drag and drop)
drag and drop support [message #1809303] Fri, 12 July 2019 16:50 Go to next message
Eclipse UserFriend
Hi

Is there some example for a drag and support for rows? I´m trying to reorder rows in a hierarchycal table, and looking at the AbstractTableField looks it does it, but I wasn´t able to drag a row with the mouse (row gets selected, instead of "captured").

If this is not the case, I will create a column with a burger image, in order to move the row as long as the user moves the burger image. Would you guys follow this approach?

By the way, How can I expose to be dragged a IDNDSupport.TYPE_JAVA_TRANSFER?

Thanks in advance
PS: Congrats, as a front dev hater, I love this project.
Re: drag and drop support [message #1809411 is a reply to message #1809303] Mon, 15 July 2019 14:38 Go to previous message
Eclipse UserFriend
Missing name Mising name wrote on Fri, 12 July 2019 16:50
Is there some example for a drag and support for rows? I´m trying to reorder rows in a hierarchycal table, and looking at the AbstractTableField looks it does it, but I wasn´t able to drag a row with the mouse (row gets selected, instead of "captured").


Unfortunately, the drag&drop implementation on tables and trees is currently missing, and will probably stay absent for quite another while... :(

It is not that that easy to implement, especially if both "moving" and "selecting" should be possible at the same time. Moving rows within a hierarchical structure has the potential for even more complicated problems, such as keeping levels or deciding whether a node should be moved "just below" the current node's parent or as last child of that parent.

Quote:
If this is not the case, I will create a column with a burger image, in order to move the row as long as the user moves the burger image. Would you guys follow this approach?


This is certainly possible, but it requires an implementation in JavaScript. If you feel confident, you can give it a try. The Table widget has a nice moveRow() method that could be useful for your purpose.

If you want to keep it simple, I would recommend adding "Move up"/"Move down" menus to the table (like in the column organize dialog on table pages, inside the little "gear" icon menu). The AbstractTable also offers methods to change the row order. This approach might not be the prettiest or most user friendly one, but it is very easy to implement and requires very little code. As a bonus, it also works nicely on touch screens.

index.php/fa/35929/0/

Regards,
Beat
Previous Topic:Image browser widget
Next Topic:Tree SmartField Lookup
Goto Forum:
  


Current Time: Mon May 19 21:19:09 EDT 2025

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

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

Back to the top