In a previous work, Optics Communications 284 (2011) 2460-2465, we considered a dielectric medium with an anti-reflection coating and a spatially uniform index of refraction illuminated at normal incidence by a quasimonochromatic field. Using the continuity equations for the electromagnetic energy density and the Gordon momentum density, we constructed a traceless, symmetric energy-momentum tensor for the closed system. In this work, we relax the condition of a uniform index of refraction and consider a dielectric medium with a spatially varying index of refraction that is independent of time, which essentially represents a mechanically rigid dielectric medium due to external constraints. Using continuity equations for energy density and for Gordon momentum density, we construct a symmetric energy-momentum matrix, whose four-divergence is equal to a generalized Helmholtz force density four-vector. Assuming that the energy-momentum matrix has tensor transformation properties under a symmetry group of space-time coordinate transformations, we derive the global conservation laws for the total energy, momentum, and angular momentum.