[kepler-dev] Re: right click bug with linux and OSX

Christopher Hylands Brooks cxh at eecs.berkeley.edu
Thu Jul 15 10:20:20 PDT 2004


Well, it looks like the problem with the mac is the following
change to diva/canvas/JCanvas.java:

2004-06-07 14:43  neuendor

	* diva/canvas/JCanvas.java (1.12): rollback previous change.  PC
	keyboard shortcuts with FocusMouseListener didn't work anymore. 
	Reimplemented focusMouseListener with a LayerListener attached to
	the ForegroundEventLayer instead of a MouseListener


The diff is:
cxh at maury 101% cvs diff -r 1.11 -r 1.12 JCanvas.java
Index: JCanvas.java
===================================================================
RCS file: /home/cvs/ptII/diva/canvas/JCanvas.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -r1.11 -r1.12
65c65
<  * @version        $Id: JCanvas.java,v 1.11 2004/05/19 00:20:59 neuendor Exp $
---
>  * @version        $Id: JCanvas.java,v 1.12 2004/06/07 21:43:30 neuendor Exp $
338,340c338,342
<      * event on to its pane (if it is not null).
<      * The mouse event is passed to the superclass' method for
<      * handling.
---
>      * event on to its pane (if it is not null).  The mouse event is
>      * passed to the superclass' method for handling.  Note that the
>      * event is always passed on to the base class event processing
>      * (i.e. MouseListeners added to the canvas) regardless of whether
>      * or not the event was consumed.
344,348c346
<         // The below call *should* be extranneous, but at least on the
<         // Macintosh, it prevents popup menus from being created...
<         if(!e.isConsumed()) {
<             super.processMouseEvent(e);
<         }
---
>         super.processMouseEvent(e);
352,355c350,355
<      * inherited method to create a LayerEvent or LayerMotionEvent
<      * and pass the event on to its pane (if it is not null).
<      * The mouse event is passed to the superclass' method for
<      * handling.
---
>      * inherited method to create a LayerEvent or LayerMotionEvent and
>      * pass the event on to its pane (if it is not null).  The mouse
>      * event is passed to the superclass method for handling.  Note
>      * that the event is always passed on to the base class event
>      * processing (i.e. MouseListeners added to the canvas) regardless
>      * of whether or not the event was consumed.
359,363c359
<         // The below call *should* be extranneous, but at least on the
<         // Macintosh, it is probably necessary (see above).
<         if(!e.isConsumed()) {
<             super.processMouseMotionEvent(e);
<         }
---
>         super.processMouseMotionEvent(e);

I think a fix like this is necessary because without it, we won't
get PC Keyboard shortcuts.  I'll verify this shortly under Windows.

BTW - I had to use Eclipse-3.0 to check out branches by date on the
Mac.  However, I could not for the life of me figure out how to 
_build_ on the Mac under Eclipse-3.0, so I checked out the branch
by date with Eclipse-3.0 and then use Eclipse-2.1 to build.  
I must be doing something silly.

I'm using Tansy's Mac, which I might be able to use later today
to verify fixes.

-Christopher

--------

    On Wed, 14 Jul 2004, Christopher Hylands Brooks wrote:
    
    >     I did try jdk1.5 and the problem was fixed.  I'll try to cvs head tod
   ay.
    
    I rebuilt with jdk 1.5 as well, and it does fix the problem.  Actually the
    'look and feel' of the GUI changes a bit with jdk 1.5.  Might just be the
    fonts.
    
    Tobin
    
    _______________________________________________
    kepler-dev mailing list
    kepler-dev at ecoinformatics.org
    http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
--------



More information about the Kepler-dev mailing list