我正在使用 gwt-links 和 gwt-dnd 框架来制作节点图。我的问题是我想拖动多个对象。有人有这个任务的经验吗?
任何想法或指向正确的方向都会有所帮助。
卢卡斯
我正在使用 gwt-links 和 gwt-dnd 框架来制作节点图。我的问题是我想拖动多个对象。有人有这个任务的经验吗?
任何想法或指向正确的方向都会有所帮助。
卢卡斯
我实际上并没有使用过 gwt-links 库,但是入门部分让我大致了解了总体思路。它使用 gwt-dnd 来移动项目,所以你唯一需要做的就是:
PickupDragController dragController = new PickupDragController(controller.getView(), true);
// Allow multiple widgets to be selected at once using CTRL-click
dragController.setBehaviorMultipleSelection(true);
dragController.makeDraggable(labelHello);
dragController.makeDraggable(labelWorld);
// Register the dragController in gwt-links
controller.registerDragController(dragController);
也就是说,按照入门 wiki http://code.google.com/p/gwt-links/wiki/GettingStarted上的预期使用 gwt 链接
并添加 setBehaviourMultipleSelection(true); 在你的 dragController 初始化行。