/[libvob]/libvob/org/nongnu/libvob/view/FisheyeState.java
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/view/FisheyeState.java

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

revision 1.5 by benja, Sat May 3 13:19:39 2003 UTC revision 1.6 by benja, Sun Jun 8 12:21:44 2003 UTC
# Line 50  public static final String rcsid = "$Id$ Line 50  public static final String rcsid = "$Id$
50      public float curx, cury;      public float curx, cury;
51      public float curmag, curmin;      public float curmag, curmin;
52    
53        /** The mouse button used for changing
54         *  the fisheye state. Default: Button 2.
55         */
56        public int MOUSE_BUTTON = java.awt.event.MouseEvent.BUTTON2_MASK;
57    
58      private int curMouseX, curMouseY;      private int curMouseX, curMouseY;
59    
60      /**      /**
# Line 120  public static final String rcsid = "$Id$ Line 125  public static final String rcsid = "$Id$
125      public boolean event(java.awt.event.MouseEvent e) {      public boolean event(java.awt.event.MouseEvent e) {
126          if(dbg) pa("Ev:"+e);          if(dbg) pa("Ev:"+e);
127          if(e.getID() == e.MOUSE_PRESSED) {          if(e.getID() == e.MOUSE_PRESSED) {
128              if(e.getModifiers() != e.BUTTON3_MASK) return false;              if(e.getModifiers() != MOUSE_BUTTON) return false;
129              curMouseX = e.getX();              curMouseX = e.getX();
130              curMouseY = e.getY();              curMouseY = e.getY();
131          } else if(e.getID() == e.MOUSE_DRAGGED) {          } else if(e.getID() == e.MOUSE_DRAGGED) {
132              if(e.getModifiers() != e.BUTTON3_MASK) return false;              if(e.getModifiers() != MOUSE_BUTTON) return false;
133    
134              int dx = e.getX() - curMouseX;              int dx = e.getX() - curMouseX;
135              int dy = e.getY() - curMouseY;              int dy = e.getY() - curMouseY;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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