/* * GWT-Ext Widget Library * Copyright(c) 2007-2008, GWT-Ext. * licensing@gwt-ext.com * * http://www.gwt-ext.com/license */ import com.google.gwt.core.client.EntryPoint; import com.gwtext.client.widgets.Panel; import com.gwtext.client.widgets.Viewport; import com.gwtext.client.widgets.layout.ColumnLayout; import com.gwtext.client.widgets.layout.ColumnLayoutData; import com.gwtext.client.widgets.layout.FitLayout; public class ColumnPctSample implements EntryPoint { public void onModuleLoad() { Panel panel = new Panel(); panel.setBorder(false); panel.setPaddings(15); panel.setLayout(new FitLayout()); //add wrapper panel just to dispaly the borders Panel wrapperPanel = new Panel(); wrapperPanel.setBorder(true); wrapperPanel.setBodyStyle("border-style:dotted;border-color:blue;"); wrapperPanel.setLayout(new ColumnLayout()); wrapperPanel.setTitle("Column Layout - Percentage Only"); wrapperPanel.add(new Panel("Column 1", "25% width"), new ColumnLayoutData(.25)); wrapperPanel.add(new Panel("Column 2", "60% width"), new ColumnLayoutData(.6)); wrapperPanel.add(new Panel("Column 3", "15% width"), new ColumnLayoutData(.15)); panel.add(wrapperPanel); new Viewport(panel); } }