Patent ID: 8645851

Claim:
A method, comprising: receiving, at a computing device, an input layout configured to specify at least a set of rectangular components of a user-interface display within a container rectangle, wherein the layout comprises, for each rectangular component of the set of rectangular components, a specification of at least one size in at least one dimension; the computing device determining a plurality of grid lines from the layout based on the specifications of at least one size for the set of rectangular components, wherein each rectangular component of the set of rectangular components is defined by at least two grid lines of the plurality of grid lines, and wherein the at least two grid lines are based on the specification of 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, wherein the system of constraints comprises inconsistent constraints; generating a graph comprising a plurality of nodes and a plurality of edges, wherein each node is associated with a node value, wherein the plurality of nodes corresponds to the plurality of grid lines, and wherein the plurality of edges corresponds to the system of constraints; solving a single-source path-length problem for the graph to determine locations for the grid lines using a variant of the Bellman-Ford algorithm configured to operate with the inconsistent constraints; and the computing device generating the user-interface display with at least some of the set of rectangular components based on the locations of the grid lines.