From: Christoph F. <cf...@fo...> - 2005-05-29 19:19:11
|
Hi Bret good to hear from you again. It's great news, that you did finish your project. Is it possible to see it running? Or maybe some screenshots? Am Mittwoch, den 25.05.2005, 13:29 -0700 schrieb Bret Cohen: > Christoph, > > If you remember our conversations of last November, > I've now created abstractors that result in the > hypergraphs creating the views of my data that I want! > I'm happy with the results(and so is my professor -- > who now wants to apply for a grant to keep on as a > research assistent to explore new applications for the > topic map hypergraph!). Thanks so much for the help > you have provided me. > > I am now trying to add another feature to trap the > event for when a user clicks on an activity (Topic) > node so that I can create a new hypergraph to show the > sub-activities > for this activity. > > I see that there is an event type EV_TMO_SELECTED, and > that the EventDispatcherImpl has a method, > sendTMOSelected(), for sending notification of such an > event. My question is: > HOW CAN I TRAP WHEN THE USER CLICKS ON THE TOPIC NODE, > SO THAT CAN THEN CALL THE ABOVE METHOD? Do I need to > trap a low-level mouse-click event, or does TMNav > provide for trapping such an event? > I'm not quite sure, if I understand what you are asking. If you want to receive a notification every time a user selects a Node, you should listen to the TMOSelected-event. But I think this is something you already found out. If you want to intercept, before TMOSelected is send, a good starting point would be org.tm4j.tmnav.renderer.CommonRendererMouseAdapter. This is where the low-level MouseEvents are captured. Is this what you are looking for? > Also, I found and fixed (within my copy of the source > code) a bug in the tmnav-0.2.9pre1-src version of > EventDispatchImpl. > (I don't know if you have fixed the bug since then): > > The dispatcher wasn't sending events to the registered > listeners. When I debugged, I noticed that the > dispatcher's send() method wasn't able to access the > changes to the listeners HashMap created when a new > listener was added. I fixed the problem (within my > copy of the code) by making the HashMap a static final > variable as follows: > > // private HashMap listeners = new HashMap(); > private static final HashMap listeners = new > HashMap(); > Sorry I do not comprehend. As far as I see, EventDispatcherImpl works like expected. Is it possible for you to send me a testcase that illustrates the problem? > I've also written a monograph that explains how I used > TM4J and TMNav to develop my application. I don't know > if it would be useful for other developers, or to > include parts within the TMNav documentation. > This is great. I would definitly love to have a look it. Can you send it to me? Thanks Christoph > Bret Cohen > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- Christoph Froehlich <cf...@fo...> |