Skip to main content



      Home
Home » Eclipse Projects » GEF » [GEF5] How to determine on which VisualPart DragAndDrop gesture is ended?
[GEF5] How to determine on which VisualPart DragAndDrop gesture is ended? [message #1771148] Tue, 22 August 2017 09:32 Go to next message
Eclipse UserFriend
Hi.
I want to drag the visual parts to each other. How to determine over which visual part the drop was made?

[Updated on: Tue, 22 August 2017 10:24] by Moderator

Re: [GEF5] How to determine on which VisualPart DragAndDrop gesture is ended? [message #1771180 is a reply to message #1771148] Tue, 22 August 2017 12:16 Go to previous message
Eclipse UserFriend
Ok. I found a solution.
Like in this post http://fxexperience.com/2016/01/node-picking-in-javafx
GEF5 has several util classes NodeUtils and PartUtils. For my task i need first retrive Node by NodeUtils.getNodesAt(...) and then use PartUtils.retrieveVisualPart(...)
List<Node> pickedNodes = NodeUtils.getNodesAt(getHost().getRoot().getVisual(), e.getSceneX(), e.getSceneY());
IVisualPart<? extends Node> retrieveVisualPart = PartUtils.retrieveVisualPart(getHost().getRoot().getViewer(), pickedNodes.get(0));

Previous Topic:How to route Connections around nodes instead of across (GEF5)
Next Topic:Edges with common Start Point
Goto Forum:
  


Current Time: Fri Apr 25 01:45:19 EDT 2025

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

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

Back to the top