void (DragGestureEvent event) { try { DnDSource source = getSource(event.getComponent()); // Actually, under Linux it is possible to get 2 or more dragGestureRecognized calls for single drag // operation. To reproduce: // 1. Do D-n-D in Styles tree // 2. Make an attempt to do D-n-D in Services tree // 3. Do D-n-D in Styles tree again. if (source == null || !MouseDragHelper.checkModifiers(event.getTriggerEvent()) || myCurrentEvent != null) { return; } DnDAction action = getDnDActionForPlatformAction(event.getDragAction()); if (!source.canStartDragging(action, event.getDragOrigin())) { return; } LOG.debug("Starting dragging for " + action); hideCurrentHighlighter(); DnDDragStartBean bean = source.startDragging(action, event.getDragOrigin()); myCurrentEvent = new DnDEventImpl(DnDManagerImpl.this, action, bean.getAttachedObject(), bean.getPoint()); myCurrentEvent.setOrgPoint(event.getDragOrigin()); Pair<Image, Point> pair = bean.isEmpty() ? null : source.createDraggedImage(action, event.getDragOrigin(), bean); if (pair == null) { pair = Pair.create(EMPTY_IMAGE, new Point(0, 0)); } if (SystemInfo.isMac && true) { Image mrImage = MultiResolutionImageProvider.convertFromJBImage(pair.first); if (mrImage != null) pair = new Pair<>(mrImage, pair.second); } if (!DragSource.isDragImageSupported()) { // not all of the platforms supports image dragging (mswin doesn't, for example). myCurrentEvent.putUserData(DRAGGED_IMAGE_KEY, pair); } // mac osx fix: it will draw a border with size of the dragged component if there is no image provided. event.startDrag(DragSource.DefaultCopyDrop, pair.first, pair.second, myCurrentEvent, new MyDragSourceListener(source)); } catch (InvalidDnDOperationException e) { LOG.info(e); } }