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;
 }
 public void mouseReleased(MouseEvent e) {
   if (dragging) {
     fireDropToolbar(e.getX() - startPoint.x, e.getY() - startPoint.y, DnDEvent.DND_ONE);
     dragging = false;
   }
 }
 public void mousePressed(MouseEvent e) {
   startPoint = new Point(e.getX(), e.getY());
 }