void (DnDEvent aEvent) { setDropTargetIndex(-1); if (aEvent.getAttachedObject() instanceof PaletteItem) { int index = locationToTargetIndex(aEvent.getPoint()); if (index >= 0) { myGroup.handleDrop(myProject, (PaletteItem) aEvent.getAttachedObject(), index); } } }