boolean (final ComponentDragObject dragObject) { // If target point doesn't belong to any cell and column then do not allow drop. if (myRow == -1 || myColumn == -1) { LOG.debug("RadContainer.canDrop=false because no cell at mouse position"); return false; } int colSpan = 1; // allow drop any (NxM) component to cell (1x1) int rowSpan = 1; for(int i=0; i<dragObject.getComponentCount(); i++) { int relativeCol = dragObject.getRelativeCol(i); int relativeRow = dragObject.getRelativeRow(i); LOG.debug("checking component: relativeRow" + relativeRow + ", relativeCol" + relativeCol + ", colSpan=" + colSpan + ", rowSpan=" + rowSpan); if (myRow + relativeRow < 0 || myColumn + relativeCol < 0 || myRow + relativeRow + rowSpan > myContainer.getGridRowCount() || myColumn + relativeCol + colSpan > myContainer.getGridColumnCount()) { LOG.debug("RadContainer.canDrop=false because range is outside grid: row=" + (myRow +relativeRow) + ", col=" + (myColumn +relativeCol) + ", colSpan=" + colSpan + ", rowSpan=" + rowSpan); return false; } final RadComponent componentInRect = findOverlappingComponent(myRow + relativeRow, myColumn + relativeCol, rowSpan, colSpan); if (componentInRect != null) { LOG.debug("GridDropLocation.canDrop=false because found component " + componentInRect.getId() + " in rect (row=" + (myRow +relativeRow) + ", col=" + (myColumn +relativeCol) + ", rowSpan=" + rowSpan + ", colSpan=" + colSpan + ")"); return false; } } LOG.debug("canDrop=true"); return true; }