1 7 8 package java.awt.dnd; 9 10 import java.awt.Component ; 11 12 import java.awt.event.MouseEvent ; 13 import java.awt.event.MouseListener ; 14 import java.awt.event.MouseMotionListener ; 15 16 47 48 public abstract class MouseDragGestureRecognizer extends DragGestureRecognizer implements MouseListener , MouseMotionListener { 49 50 private static final long serialVersionUID = 6220099344182281120L; 51 52 67 68 protected MouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl) { 69 super(ds, c, act, dgl); 70 } 71 72 83 84 protected MouseDragGestureRecognizer(DragSource ds, Component c, int act) { 85 this(ds, c, act, null); 86 } 87 88 97 98 protected MouseDragGestureRecognizer(DragSource ds, Component c) { 99 this(ds, c, DnDConstants.ACTION_NONE); 100 } 101 102 108 109 protected MouseDragGestureRecognizer(DragSource ds) { 110 this(ds, null); 111 } 112 113 116 117 protected void registerListeners() { 118 component.addMouseListener(this); 119 component.addMouseMotionListener(this); 120 } 121 122 127 128 129 protected void unregisterListeners() { 130 component.removeMouseListener(this); 131 component.removeMouseMotionListener(this); 132 } 133 134 139 140 public void mouseClicked(MouseEvent e) { } 141 142 148 149 public void mousePressed(MouseEvent e) { } 150 151 156 157 public void mouseReleased(MouseEvent e) { } 158 159 164 165 public void mouseEntered(MouseEvent e) { } 166 167 172 173 public void mouseExited(MouseEvent e) { } 174 175 180 181 public void mouseDragged(MouseEvent e) { } 182 183 189 190 public void mouseMoved(MouseEvent e) { } 191 } 192 193 194 | Popular Tags |