예제 #1
0
 public void mouseDragged(MouseEvent e) {
   int m = e.getModifiers();
   int type = DnDEvent.DND_ONE;
   if (e.isControlDown()) type = DnDEvent.DND_LINE;
   else if (((m & InputEvent.BUTTON2_MASK) != 0) || ((m & InputEvent.BUTTON3_MASK) != 0))
     type = DnDEvent.DND_END;
   if (startPoint == null) startPoint = new Point(e.getX(), e.getY());
   fireDragToolbar(e.getX() - startPoint.x, (e.getY() - startPoint.y), type);
   dragging = true;
 }
예제 #2
0
 public void mouseReleased(MouseEvent e) {
   if (dragging) {
     fireDropToolbar(e.getX() - startPoint.x, e.getY() - startPoint.y, DnDEvent.DND_ONE);
     dragging = false;
   }
 }
예제 #3
0
 public void mousePressed(MouseEvent e) {
   startPoint = new Point(e.getX(), e.getY());
 }