Quantitative studies of two-dimensional first- and second-order phase transitions by integrating diffraction methods