/* * 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.google.gwt.user.client.ui.Frame; import com.gwtext.client.core.Position; import com.gwtext.client.widgets.Panel; import com.gwtext.client.widgets.TabPanel; import com.gwtext.client.widgets.Viewport; import com.gwtext.client.widgets.layout.FitLayout; public class BottomTabPanelSample implements EntryPoint { public void onModuleLoad() { Panel panel = new Panel(); panel.setBorder(false); panel.setPaddings(15); panel.setLayout(new FitLayout()); TabPanel tabPanel = new TabPanel(); tabPanel.setTabPosition(Position.BOTTOM); tabPanel.setResizeTabs(true); tabPanel.setMinTabWidth(115); tabPanel.setTabWidth(135); tabPanel.setActiveTab(0); Frame google = new Frame("http://www.google.com"); Panel googlePanel = new Panel("Google"); googlePanel.setLayout(new FitLayout()); googlePanel.setIconCls("tab-icon"); googlePanel.add(google); Panel staticPanel = new Panel(); staticPanel.setTitle("News"); staticPanel.setAutoScroll(true); staticPanel.setHtml(getBogusMarkup()); tabPanel.add(googlePanel); tabPanel.add(staticPanel); panel.add(tabPanel); Viewport viewport = new Viewport(panel); } private static String getBogusMarkup() { return "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. " + "Sed metus nibh, sodales a, porta at, vulputate eget, dui. " + "In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, " + "cursus a, fringilla vel, urna."; } }