public static class LayoutPanel extends Object
layers
using the
Layout
class.
This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration.
LayoutPanel elements in UiBinder
templates lay out their children with arbitrary constraints, using
<g:layer> elements. Each layer may have any of the following constraint
attributes specified as CSS length attributes: left
,
top
, right
, bottom
, width
, and height
.
Precisely zero or two constraints are required for each axis (horizontal and vertical). Specifying no constraints implies that the child should fill that axis completely.
The valid sets of horizontal constraints are:
The valid sets of vertical constraints are:
The values of constraint attributes can be any valid CSS length,
such as 1px
, 3em
, or 0
(zero lengths require no
units).
For example:
<g:LayoutPanel> <!-- No constraints causes the layer to fill the parent --> <g:layer> <g:Label>Lorem ipsum...</g:Label> </g:layer> <!-- Position horizontally 25% from each edge; Vertically 4px from the top and 10em tall. --> <g:layer left='25%' right='25%' top='4px' height='10em'> <g:Label>Header</g:Label> </g:layer> </g:LayoutPanel>
Copyright © 2018. All rights reserved.