1 10 11 package swingwt.awt.dnd; 12 13 import java.util.EventObject ; 14 import java.util.Iterator ; 15 import java.util.List ; 16 17 import org.eclipse.swt.dnd.DragSource; 18 19 import swingwt.awt.Component; 20 import swingwt.awt.Cursor; 21 import swingwt.awt.Image; 22 import swingwt.awt.Point; 23 import swingwt.awt.datatransfer.Transferable; 24 import swingwt.awt.event.InputEvent; 25 26 public class DragGestureEvent extends EventObject { 27 28 private List events; 29 private DragSource dragSource; 30 private Component component; 31 private Point origin; 32 private int action; 33 34 public DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs) { 35 super(dgr); 36 events = evs; 37 action = act; 38 origin = ori; 39 } 40 41 public DragGestureRecognizer getSourceAsDragGestureRecognizer() { 42 return (DragGestureRecognizer) getSource(); 43 } 44 45 public Component getComponent() { 46 return component; 47 } 48 49 public DragSource getDragSource() { 50 return dragSource; 51 } 52 53 public Point getDragOrigin() { 54 return origin; 55 } 56 57 public Iterator iterator() { 58 return events.iterator(); 59 } 60 61 public Object [] toArray() { 62 return events.toArray(); 63 } 64 65 public Object [] toArray(Object [] array) { 66 return events.toArray(array); 67 } 68 69 public int getDragAction() { 70 return action; 71 } 72 73 public InputEvent getTriggerEvent() { 74 return getSourceAsDragGestureRecognizer().getTriggerEvent(); 75 } 76 77 public void startDrag(Cursor dragCursor, Transferable transferable) throws 78 InvalidDnDOperationException { 79 82 } 84 85 public void startDrag(Cursor dragCursor, Transferable transferable, swingwt.awt.dnd.DragSourceListener dsl) 86 throws InvalidDnDOperationException { 87 90 } 92 93 public void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, 94 Transferable transferable, swingwt.awt.dnd.DragSourceListener dsl) throws InvalidDnDOperationException { 95 98 } 100 101 102 } 103
| Popular Tags
|