void (final RadContainer container, final RadComponent[] components, int row, int column, final ComponentDragObject dragObject) { assert components.length > 0; for(int i=0; i<components.length; i++) { RadComponent c = components [i]; if (c instanceof RadContainer) { final LayoutManager layout = ((RadContainer)c).getLayout(); if (layout instanceof XYLayoutManager) { ((XYLayoutManager)layout).setPreferredSize(c.getSize()); } } int relativeCol = dragObject.getRelativeCol(i); int relativeRow = dragObject.getRelativeRow(i); LOG.debug("dropIntoGrid: relativeRow=" + relativeRow + ", relativeCol=" + relativeCol); int colSpan = dragObject.getColSpan(i); int rowSpan = dragObject.getRowSpan(i); assert row + relativeRow >= 0; assert column + relativeCol >= 0; if (rowSpan > 1 || colSpan > 1) { if ((row + relativeRow + rowSpan > container.getGridRowCount() && rowSpan > 1) || (column + relativeCol + colSpan > container.getGridColumnCount() && colSpan > 1) || container.findComponentInRect(row + relativeRow, column + relativeCol, rowSpan, colSpan) != null) { rowSpan = 1; colSpan = 1; } } if (!container.getGridLayoutManager().isGridDefinedByComponents()) { assert relativeRow + rowSpan <= container.getGridRowCount(); assert relativeCol + colSpan <= container.getGridColumnCount(); } RadComponent old = container.findComponentInRect(row + relativeRow, column + relativeCol, rowSpan, colSpan); if (old != null) { LOG.error("Drop rectangle not empty: (" + (row + relativeRow) + ", " + (column + relativeCol) + ", " + rowSpan + ", " + colSpan + "), component ID=" + old.getId()); } final GridConstraints constraints = c.getConstraints(); constraints.setRow(row + relativeRow); constraints.setColumn(column + relativeCol); constraints.setRowSpan(rowSpan); constraints.setColSpan(colSpan); LOG.info("GridDropLocation.dropIntoGrid() constraints=" + constraints); container.addComponent(c); // Fill DropInfo c.revalidate(); } container.revalidate(); LOG.info("GridDropLocation.dropIntoGrid() done"); }