private static boolean areCellsAdjacent(final IContainer parent, final GridConstraints c1, final GridConstraints c2) {
    if (parent instanceof RadContainer container) {
      if (!container.getLayoutManager().isGrid()) return false;
      if (c1.getRow() == c2.getRow()) {
        return FormEditingUtil.prevCol(container, c1.getColumn()) == c2.getColumn() ||
               FormEditingUtil.nextCol(container, c1.getColumn()) == c2.getColumn();
      }
      if (c1.getColumn() == c2.getColumn()) {
        return FormEditingUtil.prevRow(container, c1.getRow()) == c2.getRow() ||
               FormEditingUtil.nextRow(container, c1.getRow()) == c2.getRow();
      }
    }
    return c1.getRow() == c2.getRow() && Math.abs(c1.getColumn() - c2.getColumn()) == 1 ||
           c1.getColumn() == c2.getColumn() && Math.abs(c1.getRow() - c2.getRow()) == 1;
  }
private static boolean areCellsAdjacent(final IContainer parent, final GridConstraints c1, final GridConstraints c2)