Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [GEF5] Hover Feedback parts and zoom
[GEF5] Hover Feedback parts and zoom [message #1785009] Sat, 07 April 2018 01:58 Go to next message
Kyle Girard is currently offline Kyle GirardFriend
Messages: 12
Registered: March 2012
Junior Member
In my graph I have a node that when I hover the mouse over it I pop up a visual displaying contextual information about that node. When I zoom the entire graph in and out this context popup shrinks with the graph. How to I get this feedback visual to stay legible? and disregard the zoom?

I've tried to get the inverse of the host visual parts localToSceneTransform matrix and scale by that... and it almost works except for when I drag the host part and the context pop up either shrinks or grows to oblivion as a drag it around.

I'm doing all this in the popup parts doRefreshVisual() method is that the right place to do it? Changing the transform of the visual causes the doRefreshVisual to be called multiple times so I'm guessing it should be done elsewhere?
Re: [GEF5] Hover Feedback parts and zoom [message #1785836 is a reply to message #1785009] Fri, 20 April 2018 12:07 Go to previous message
Matthias Wienand is currently offline Matthias WienandFriend
Messages: 230
Registered: March 2015
Senior Member
Hi Kyle,

you need to place the popup visual in another layer than the contents, so that the popup is not scrolled/zoomed with the contents.

The InfiniteCanvas provides several JavaFX Parent visuals that can be used to place custom visualisations, e.g. scrollbar group (on top), overlay group, scrolled pane (this is where the contents are placed, too, but in a sub-layer thereof), and underlay group.

The underlayGroup is suitable for visuals that should lie behind the contents.

The overlayGroup is where you could place the popup.

Unfortunately, the GEF defaults do not place visuals in any other layer than the scrolled content layer of the InfiniteCanvas, i.e. you would probably want to extend the RootPart so that special PopupHandleParts are added to the overlay group instead.

Additionally, you will need to write code to keep the popup at the correct location within the overlay group.

If you have further questions, feel free to ask. Also, we can discuss code here that is giving you troubles.

h2h
Matthias
Previous Topic:Zest5: getting the model node from the displayed node
Next Topic:Old GEF problem
Goto Forum:
  


Current Time: Tue Apr 23 14:15:25 GMT 2024

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

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

Back to the top