Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:32 Go to next message
Maxim Martynov is currently offline Maxim MartynovFriend
Messages: 16
Registered: February 2017
Junior Member
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 14:24]

Report message to a 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 16:16 Go to previous message
Maxim Martynov is currently offline Maxim MartynovFriend
Messages: 16
Registered: February 2017
Junior Member
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: Sat Jan 20 10:55:41 GMT 2018

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

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