Hi all,
I'm still banging my head on a variation of this problem. With the
TreeView I ended up creating a timer that would fire off after the mouse
handler was invoked, get the current selection and find what was clicked
on that way.
Now I'm having this problem with a TextView. However, if I right-click
on a TextView, the selection isn't changed. So my approach doesn't work.
The only plausible way I see of doing this is to map the mouse location
to a lineNum/offset in the TextView somehow. After digging through the
java docs for a while, I can't find anything appropriate. Does anyone
know of a way this can be accomplished?
Thanks,
Igor
On Fri, 2005-06-17 at 10:37 -0400, Igor Foox wrote:
> Hi,
>
> I'm trying to get context-sensitive popup menus to appear in a tree
> view. I want to be able to figure out which row the mouse is over in my
> popup handler method (which uses MouseListener). The problem is that I
> can't find anything that will tell me the location of the mouse over the
> TreeView, only the current selection, so if I click on anything other
> than the currently selected item, this won't work. Is there any
> convenient way I can extract this information?
>
>
> Thanks,
> Igor
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> java-gnome-developer mailing list
> jav...@li...
> https://lists.sourceforge.net/lists/listinfo/java-gnome-developer
|