/[libvob]/libvob/org/nongnu/libvob/VobMouseEvent.java
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/VobMouseEvent.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Sat Aug 2 07:42:44 2003 UTC revision 1.2 by tjl, Sat Aug 2 09:07:11 2003 UTC
# Line 6  package org.nongnu.libvob; Line 6  package org.nongnu.libvob;
6   * This class exists because of the strange behaviour of   * This class exists because of the strange behaviour of
7   * java.awt.MouseEvent (i.e. aliasing BUTTON2 and ALT etc.).   * java.awt.MouseEvent (i.e. aliasing BUTTON2 and ALT etc.).
8   * It also allows our OpenGL code to never depend on AWT classes.   * It also allows our OpenGL code to never depend on AWT classes.
9     * <p>
10     * Limitation: we do not allow mouse button chords.
11   */   */
12  public class VobMouseEvent {  public class VobMouseEvent {
13      public final static int MOUSE_PRESSED = 1827;      public final static int MOUSE_PRESSED = 1827;
# Line 14  public class VobMouseEvent { Line 16  public class VobMouseEvent {
16      public final static int MOUSE_DRAGGED = 1830;      public final static int MOUSE_DRAGGED = 1830;
17      public final static int MOUSE_WHEEL = 1831;      public final static int MOUSE_WHEEL = 1831;
18    
19        // DO NOT CHANGE WITHOUT CHANGING OPENGL CODE AS WELL
20      public final static int SHIFT_MASK = 1;      public final static int SHIFT_MASK = 1;
21      public final static int CONTROL_MASK = 2;      public final static int CONTROL_MASK = 2;
22      public final static int ALT_MASK = 4;      public final static int ALT_MASK = 4;
# Line 33  public class VobMouseEvent { Line 36  public class VobMouseEvent {
36       */       */
37      public int getButton() { return this.button; }      public int getButton() { return this.button; }
38    
39        /** Create a new vob mouse event.
40         * @param type MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, MOUSE_DRAGGED, or MOUSE_WHEEL
41         * @param x,y The coordinates
42         * @param wheelDelta The wheel movement
43         * @param modifiers Bitwise or of SHIFT_MASK, CONTROL_MASK, ALT_MASK
44         * @param button The mouse button being pressed.
45         */
46      public VobMouseEvent(      public VobMouseEvent(
47              int type,              int type,
48              int x,              int x,
# Line 48  public class VobMouseEvent { Line 58  public class VobMouseEvent {
58          this.button = button;          this.button = button;
59      }      }
60    
61        public String toString() {
62            return "[VobMouseEvent: "+type+" "+x+" "+y+" "
63                    +wheelDelta+" "+modifiers+" "+button+"]";
64        }
65    
66  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26