Browse Prior Art Database

Component based layout manager Disclosure Number: IPCOM000015186D
Original Publication Date: 2002-Sep-08
Included in the Prior Art Database: 2003-Jun-20

Publishing Venue



This publication describes a component based layout manager. Programmers have long used the idea of layout managers to arrange the components of a UI on the screen. Layout manager divide or segment the viewing area (or window) into areas in which the UI components may be placed. For example, a common layout manager in Java's AWT library is the border layout: As seen in this illustration, the border layout segments the total viewing area. UI components are added to these areas and are therefore added relative to screen offsets. A component based layout manager will distribute components not based on locations relative the viewing area, rather, the components are laid out relative to other components already located within the layout. Consider the following picture: Suppose the application UI contained an existing button. Now assume the application wants to add a new button directly beneath the existing button. In a conventional layout system, the application programmer will need to understand the layout in which the existing button has been placed. Then, if the programmer was lucky, the layout will have an open area in which the new button could be added. However, the usual case is that there is not an available location, and the programmer must manipulate the existing components to get the desired result. For example, in this case the programmer may create a new layout that has two empty slots, then remove the existing button and place it in the upper slot of the new layout, and add the new button to the lower slot. Then the programmer can add the new layout back to the location in which the existing button had been originally. If the programmer was using a component based layout, the process of adding the new button becomes much easier. The programmer need only reference the existing button and let the layout manager handle the placement. For example, the following pseudocode demonstrates the idea: