void (final MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_PRESSED) { myPressPoint = e.getPoint(); } else if (e.getID() == MouseEvent.MOUSE_RELEASED) { if (!myDragStarted) { RadComponent component = FormEditingUtil.getRadComponentAt(myEditor.getRootContainer(), e.getX(), e.getY()); if (component != null) { if (UIUtil.isControlKeyDown(e)) { component.setSelected(!component.isSelected()); } } } } else if (e.getID() == MouseEvent.MOUSE_DRAGGED) { if (!myDragStarted) { if ((Math.abs(e.getX() - myPressPoint.getX()) > TREMOR || Math.abs(e.getY() - myPressPoint.getY()) > TREMOR)) { ArrayList<InputEvent> eventList = new ArrayList<>(); eventList.add(e); myDragGestureRecognizer.setTriggerEvent(e); DragGestureEvent dge = new DragGestureEvent(myDragGestureRecognizer, UIUtil.isControlKeyDown(e) ? DnDConstants.ACTION_COPY : DnDConstants.ACTION_MOVE, myPressPoint, eventList); myDragStarted = true; myEditor.getDropTargetListener().setUseDragDelta(true); dge.startDrag(null, DraggedComponentList.pickupSelection(myEditor, e.getPoint()), myDragSourceListener); } } } }