com.gwtextux.client.widgets.layout
Class RowLayout

java.lang.Object
  extended by com.gwtext.client.widgets.layout.ContainerLayout
      extended by com.gwtextux.client.widgets.layout.RowLayout

public class RowLayout
extends com.gwtext.client.widgets.layout.ContainerLayout

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.

Example usage:



 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);

 


Field Summary
 
Fields inherited from class com.gwtext.client.widgets.layout.ContainerLayout
configJS
 
Constructor Summary
RowLayout()
           
 
Method Summary
protected  com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
           
 
Methods inherited from class com.gwtext.client.widgets.layout.ContainerLayout
getActiveItem, getContainerAttributes, getJsObj, getSpacing, setExtraCls, setRenderHidden, setSpacing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowLayout

public RowLayout()
Method Detail

create

protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
Overrides:
create in class com.gwtext.client.widgets.layout.ContainerLayout