/* * 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 ColumnMixedSample 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 - Mixed"); Panel p1 = new Panel("Column 1", "120px width"); p1.setWidth(120); wrapperPanel.add(p1); wrapperPanel.add(new Panel("Column 2", "80% width"), new ColumnLayoutData(.8)); wrapperPanel.add(new Panel("Column 3", "20% width"), new ColumnLayoutData(.2)); panel.add(wrapperPanel); new Viewport(panel); } }