Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Flickering in custom feedback figure(Hover-Sensitive control flickers on mouse-move)
Flickering in custom feedback figure [message #548351] Wed, 21 July 2010 14:45
Chris  is currently offline Chris Friend
Messages: 44
Registered: April 2010
Member
Hi,

for my diagram nodes I recreated the Eclipse editor tabs "close X". Should work like this:


  1. When there is no mouse hover and the node is not selected, the X is not shown
  2. When the mouse hovers over some part of the node but not the area of the close button, the close button is rendered white with black outline
  3. When the Node is selected, but the mouse does not hover over the close button, the close button is always rendered, even if the ouse leaves the area of the node again
  4. When the mouse hovers over the close button, the X is rendered light red.
  5. When pressed, the X should shift a bit to the bottom right
  6. If the mouse is released over the X, the node should be closed, i.e. removed from the diagram (I represent project files that continue to exist after the operation, so the close metaphor applies).


So using a custom SelectionEditPolicy registered as SELECTION_FEEDBACK_POLICY I managed to get the the first four points more or less right. My close button is a Figure inserted into the SCALABLE_FEEDBACK_LAYER parsing its own mouse events via the MouseListener and MouseMotionListener interfaces. For that to work, I had to manually enable that label, as it is disabled by default (would be nice, if the documentation could reflect that design choice somewhere. I've spend half a day debugging and questioning myself before finding the problem somewhere in the GEF source code.)

The problem now is the following: If the mouse enters the area of the close button it starts to flicker when the node is not selected. Often it just decides to disappear completely when the mouse comes to a halt hovering over it. The problem seems to be that "eraseTargetFeedback" in the policy is called.

Also I do not get any mouse release event, so the best I could do right now is to delete the node on mouse down, which is not so super user friendly. I support undo, but the user should be allowed to change her mind after mouse down, move the mouse away from the X and release without consequence.

The first problem indicates, that the close button "sucks up" the mouse hover events from the node, while the second indicates, that the the mouse click seems to be sucked up by the underlying node. Can both of these problems persist in the same space-time-continuum (i.e. GEF) Confused

Any insights/ideas/recommendations are appreciated.

Best regards,
Chris
Previous Topic:Subclass of PolylineConnection instances are not visible
Next Topic:Unable to bring in gef source for debugging
Goto Forum:
  


Current Time: Fri Apr 26 15:05:02 GMT 2024

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

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

Back to the top