|Re: providing visual feedback depending on state during connection [message #902198 is a reply to message #900782]
||Thu, 16 August 2012 10:13
| Rui Domingues
Registered: October 2010
I think this is going to against my need of visual feedback when I'm creating objects.
When I am creating an object I'm drawing some lines in diagram at the place where the object is really going to be placed. (Because I have a restrictive layout) - grid based - but I am not allowed to have "guide dashed"-lines allways in the diagram. My requirement is not to show any lines, unless the user is "creating an object"; In that situation I draw the lines at the right place. This is very tricky, but easily I could layout the lines when "canCreate" is invoked, however, undraw them when creation is cancelled or the mouse goes out of the diagram is difficult.
I got a solution with threads that is working fine (so far), that is when canCreate is not invoked after 2 seconds, one thing out of three happened ( or creation was cancelled, or mouse is out of diagram, or mouse is over diagram with no motion).In this case thread calls layout in order to "erase" the lines.
This is not ideal, but works.
Can you tell me how are you detecting that object creation (not connection) is cancelled or mouse is no longer over diagram?
Thanks. Any solution without threads (actually I use only one thread), is welcome, once I predict this is troubly. My question is how do you proceed to know when color must change, and how are you drawing and undrawing.
Thanks in advance
[Updated on: Thu, 16 August 2012 10:34]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01911 seconds