Class AbsolutePanel

java.lang.Object
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, InsertPanel, InsertPanel.ForIsWidget, IsWidget, Iterable<Widget>
Direct Known Subclasses:
RootPanel

public class AbsolutePanel extends ComplexPanel implements InsertPanel.ForIsWidget
An absolute panel positions all of its children absolutely, allowing them to overlap.

Note that this panel will not automatically resize itself to allow enough room for its absolutely-positioned children. It must be explicitly sized in order to make room for them.

Once a widget has been added to an absolute panel, the panel effectively "owns" the positioning of the widget. Any existing positioning attributes on the widget may be modified by the panel.

Use in UiBinder Templates

AbsolutePanel elements in UiBinder templates lay out their children with absolute position, using <g:at> elements. Each at element should have left and top attributes in pixels. They also can contain widget children directly, with no position specified.

For example:

 <g:AbsolutePanel>
   <g:at left='10' top='20'>
     <g:Label>Lorem ipsum...</g:Label>
   </g:at>
   <g:Label>...dolores est.</g:Label>
 </g:AbsolutePanel>