KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > dnd > DragSourceDragEvent


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4  
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7  
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9  
10    $Log: DragSourceDragEvent.java,v $
11    Revision 1.1 2004/05/05 12:43:19 bobintetley
12    Patches/new files from Laurent Martell
13
14  
15  */

16
17 package swingwt.awt.dnd;
18
19 /** @author Laurent Martell */
20 public class DragSourceDragEvent extends DragSourceEvent {
21
22     public DragSourceDragEvent(DragSourceContext dsc, int dropAction,
23                                int targetActions, int gestureModifiers)
24     {
25         super(dsc);
26         this.targetActions = targetActions;
27         this.gestureModifiers = gestureModifiers;
28         this.dropAction = dropAction;
29     }
30
31     public DragSourceDragEvent(DragSourceContext dsc, int dropAction,
32                                int targetActions, int gestureModifiers,
33                                int x, int y)
34     {
35         super(dsc,x,y);
36         this.targetActions = targetActions;
37         this.gestureModifiers = gestureModifiers;
38         this.dropAction = dropAction;
39     }
40
41     int targetActions;
42     public int getTargetActions() {
43         return targetActions;
44     }
45
46     int dropAction;
47     public int getUserAction() {
48         return dropAction;
49     }
50
51     int gestureModifiers;
52     public int getGestureModifiers() {
53         return gestureModifiers;
54     }
55     public int getGestureModifiersEx() {
56         return gestureModifiers;
57     }
58     
59     public int getDropAction() {
60         return dropAction
61             & targetActions
62             & getDragSourceContext().getSourceActions();
63     }
64 }
65
Popular Tags