Layout that distributes heights of elements so they take 100% of the container height.
Height of the child element can be given in pixels (as an integer) or in percent. All elements with absolute height (i.e. in pixels) always will have the given height. All "free" space (that is not filled with elements with 'absolute' height) will be distributed among other elements in proportion of their height percentage. Elements without 'height' in the config will take equal portions of the "unallocated" height.
Supports panel collapsing, hiding, removal/addition.
@author Sanjiv Jivan
Panel panel = new Panel(); panel.setLayout(new RowLayout()); Panel first = new Panel(); first.setTitle("Height in pixels"); first.setHtml("panel height = 100px"); panel.add(first, new RowLayoutData(100); Panel second = new Panel(); second.setTitle("1/2"); second.setHtml("Will take half of remaining height"); panel.add(second, new RowLayoutData("50%")); Panel third = new Panel(); third.setTitle("No height 1"); third.setHtml("Panel without given height"); panel.add(third); Panel fourth = new Panel(); fourth.setTitle("No height 2"); fourth.setHtml("Another Panel"); panel.add(fourth); Viewport viewport = new Viewport(panel);