Domain Specific High-Level Constraints for User Interface Layout

We present the Auckland Layout Model (ALM), a constraint-based technique for specifying 2D layout as it is used for arranging the controls in a graphical user interface (GUI). Most GUI frameworks offer layout managers that are basically adjustable tables; often adjacent table cells can be merged. In the ALM, the focus switches from the table cells to vertical and horizontal tabulators between the cells. On the lowest level of abstraction, the model applies linear constraints, and an optimal layout is calculated using linear programming. However, bare linear programming makes layout specification cumbersome and unintuitive, especially for GUI domain experts who are often not used to such mathematical formalisms. In order to improve the usability of the model, ALM offers several other layers of abstraction that make it possible to define common GUI layout more easily. In the domain of user interfaces it is important that specifications are not over-constrained, therefore ALM introduces soft constraints, which are automatically translated to appropriate hard linear constraints and terms in the objective function. GUIs are usually composed of rectangular areas containing controls, therefore ALM offers an abstraction for such areas. Dynamic resizing behavior is very important for GUIs, hence areas have domain-specific parameters specifying their minimum, maximum and preferred sizes. From such definitions, hard and soft constraints are automatically derived. A third level of abstraction allows designers to arrange GUIs in a tabular fashion, using abstractions for columns and rows, which offer additional parameters for ordering and alignment. Row and column definitions are used to automatically generate definitions from lower levels of abstraction, such as hard and soft constraints and areas. Specifications from all levels of abstraction can be consistently combined, offering GUI developers a rich set of tools that is much closer to their needs than pure linear constraints. Incremental computation of solutions makes constraint solving fast enough for near real-time use.

[1]  Kim Marriott,et al.  QOCA: A Constraint Solving Toolkit for Interactive Graphical Applications , 2004, Constraints.

[2]  Pedro Meseguer,et al.  Current Approaches for Solving Over-Constrained Problems , 2004, Constraints.

[3]  Christopher J. Van Wyk A graphics typesetting language , 1981 .

[4]  David Salesin,et al.  Adaptive grid-based document layout , 2003, ACM Trans. Graph..

[5]  Christof Lutteroth,et al.  AP1: A Platform for Model-Based Software Engineering , 2006, TEAA.

[6]  Sharon Zakhour,et al.  The JFC Swing Tutorial: A Guide to Constructing GUIs , 1999 .

[7]  Peter J. Stuckey,et al.  The Cassowary linear arithmetic constraint solving algorithm , 2001, TCHI.

[8]  Hiroshi Hosobe,et al.  A Scalable Linear Constraint Solver for User Interface Construction , 2000, CP.

[9]  Joëlle Coutaz A layout abstraction for user-system interface , 1985, SGCH.

[10]  Christof Lutteroth Automated Reverse Engineering of Hard-Coded GUI Layouts , 2008, AUIC.

[11]  Christof Lutteroth,et al.  Modular Specification of GUI Layout Using Constraints , 2008, 19th Australian Conference on Software Engineering (aswec 2008).

[12]  Alan Borning,et al.  Constraint-based document layout for the Web , 2000, Multimedia Systems.

[13]  Richard J. Anderson,et al.  The table layout problem , 1999, SCG '99.

[14]  David Salesin,et al.  Adaptive document layout , 2004, CACM.

[15]  Christof Lutteroth,et al.  User interface layout with ordinal and linear constraints , 2006, AUIC.

[16]  Alan Borning,et al.  Constraint hierarchies , 1992 .

[17]  Rj. Beach Text processing and document manipulation: Tabular Typography , 1986 .

[18]  Hiroshi Hosobe A modular geometric constraint solver for user interface applications , 2001, UIST '01.

[19]  Christopher J. Van Wyk A graphics typesetting language , 1981 .

[20]  Michael Sannella Skyblue: a multi-way local propagation constraint solver for user interface construction , 1994, UIST '94.

[21]  Peter J. Stuckey,et al.  Solving linear arithmetic constraints for user interface applications , 1997, UIST '97.

[22]  Dirk Draheim,et al.  Form-oriented analysis , 2004 .

[23]  Nesa L'abbe Wu,et al.  Linear programming and extensions , 1981 .

[24]  Horst Silberhorn,et al.  TabulaMagica: an integrated approach to manage complex tables , 2001, DocEng '01.

[25]  Satoshi Matsuoka,et al.  A Foundation of Solution Methods for Constraint Hierarchies , 2004, Constraints.

[26]  Bjørn N. Freeman-Benson,et al.  Ultraviolet: A Constraint Satisfaction Algorithm for Interactive Graphics , 1998, Constraints.

[27]  Bjørn N. Freeman-Benson,et al.  An incremental constraint solver , 1990, CACM.

[28]  Dirk Draheim,et al.  Form-oriented analysis - a new methodology to model form-based applications , 2005 .

[29]  Paul Abrahams Proceedings of the ACM SIGPLAN SIGOA symposium on Text manipulation , 1981 .