MouseListener
inner-class adapters throughout the code that get informed of various types of mouse event. There is in fact a isPopupTrigger()
method on the MouseEvent
class that gets passed as a parameter to these adapters. All I did was hovered my mouse over the isPopupTrigger()
method to get the javadoc - this is what it said:Returns whether or not this mouse event is the popup menu trigger event for the platform.
Note: Popup menus are triggered differently on different systems. Therefore,isPopupTrigger
should be checked in bothmousePressed
andmouseReleased
for proper cross-platform functionality.
Code was only looking for this in the
mouseReleased()
event, not the corresponding mousePressed()
event too! Therefore, to make it cross-platform compatible all I had to do was extract the code that responded to the popup trigger to a private method and add it to mousePressed()
method too (within an if-else
clause with the code that was already there).eProfile is actually written against v1.21 of the touchgraph library (from 03/04/2002); the most recent version is actually v1.22 (from 04/12/2002), but I saw that the bug is still present in that code too. The touchgraph library is an excellent library for forced-graph visualization (especially if you look at their Amazon and Google demos). Part of the problem (from reading their web-site) is that they are still working out how to separate proprietary from open-source portions of their code, so the stuff they are making available, they refer to themselves are older touchgraph components. One might assume that if these libraries were maintained as fully-fledged open-source projects, then such bugs would have been knocked out by members of the community a long time ago ;-).