Patent ID: 8599218

Claim:
A method, comprising: receiving, at a computing device, a layout configured to specify at least a set of rectangular components within a container rectangle, wherein each rectangular component of the set of rectangular components has at least one size in at least one dimension, and wherein the set of rectangular components comprises a space component configured to be non-visible and configured not to react to user-interface events; the computing device determining a plurality of grid lines from the layout, wherein each rectangular component of the set of rectangular components is associated with at least two grid lines of the plurality of grid lines, the at least two grid lines based on the at least one size of the rectangular component; the computing device generating a system of constraints, wherein each constraint of the system of constraints is related to at least two grid lines of the plurality of grid lines; the computing device solving the system of constraints to determine, for each grid line in the plurality of grid lines, a location for the grid line, wherein solving the system of constraints comprises solving the system of constraints using a variant of the Bellman-Ford algorithm; and the computing device generating a display of at least some of the set of rectangular components based on the locations of the grid lines.