[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gzz-commits] libvob/org/nongnu/libvob/mouse MouseMultiplexer...
From: |
Tuomas Lukka |
Subject: |
Re: [Gzz-commits] libvob/org/nongnu/libvob/mouse MouseMultiplexer... |
Date: |
Wed, 6 Aug 2003 18:01:07 +0300 |
User-agent: |
Mutt/1.5.4i |
On Wed, Aug 06, 2003 at 08:52:13AM -0400, Matti Katila wrote:
> CVSROOT: /cvsroot/libvob
> Module name: libvob
> Branch:
> Changes by: Matti Katila <address@hidden> 03/08/06 08:52:10
>
> Modified files:
> org/nongnu/libvob/mouse: MouseMultiplexer.java
>
> Log message:
> typesafe enumeration
>
> CVSWeb URLs:
> http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/mouse/MouseMultiplexer.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
>
> Patches:
> Index: libvob/org/nongnu/libvob/mouse/MouseMultiplexer.java
> diff -u libvob/org/nongnu/libvob/mouse/MouseMultiplexer.java:1.5
> libvob/org/nongnu/libvob/mouse/MouseMultiplexer.java:1.6
> --- libvob/org/nongnu/libvob/mouse/MouseMultiplexer.java:1.5 Wed Aug 6
> 05:51:30 2003
> +++ libvob/org/nongnu/libvob/mouse/MouseMultiplexer.java Wed Aug 6
> 08:52:09 2003
> @@ -8,13 +8,20 @@
> /** A class to send mouse events to the listeners that want them.
> */
> public class MouseMultiplexer {
> +
> + /** Direction(s) of controller to use.
> + * This is a typesafe enumeration.
> + */
> + private static final class Direction { private Direction() {} }
> +
> /** A constant representing the horizontal direction.
> */
> - public static final int HORIZONTAL = 1;
> + public static final Direction HORIZONTAL = new Direction();
> +
> /** A constant representing the vertical direction.
> */
> - public static final int VERTICAL = 2;
> -
> + public static final Direction VERTICAL = new Direction();
> +
> /** The largest button number accepted plus one.
> */
> public final static int MAXBUTTON = 4;
> @@ -97,7 +104,7 @@
> /** Set a listener for mouse drags, translating one of the axes of the
> drag
> * to the RelativeAxisListener.
> */
> - public void setListener(int button, int modifiers, int dir, float
> multiplier,
> + public void setListener(int button, int modifiers, Direction dir, float
> multiplier,
> String description, RelativeAxisListener l) {
> int ind = modifiers + MAXMASK * button;
> if(mousePressListeners[ind] == null || !(mousePressListeners[ind]
> instanceof RelAxisAdapter))
Please fix the PEG as well
Tuomas