01: /*
02: * GWT-Ext Widget Library
03: * Copyright(c) 2007-2008, GWT-Ext.
04: * licensing@gwt-ext.com
05: *
06: * http://www.gwt-ext.com/license
07: */
08: package com.gwtext.sample.showcase2.client.tabs;
09:
10: import com.google.gwt.user.client.ui.Frame;
11: import com.gwtext.client.core.Position;
12: import com.gwtext.client.widgets.Panel;
13: import com.gwtext.client.widgets.TabPanel;
14: import com.gwtext.client.widgets.layout.FitLayout;
15: import com.gwtext.client.widgets.menu.Menu;
16: import com.gwtext.sample.showcase2.client.SampleData;
17: import com.gwtext.sample.showcase2.client.ShowcasePanel;
18:
19: public class BottomTabPanelSample extends ShowcasePanel {
20:
21: public String getSourceUrl() {
22: return "source/tabs/BottomTabPanelSample.java.html";
23: }
24:
25: public String getCssUrl() {
26: return "source/tabs/BottomTabPanelSample.css.html";
27: }
28:
29: public Panel getViewPanel() {
30: if (panel == null) {
31: panel = new Panel();
32: panel.setLayout(new FitLayout());
33:
34: TabPanel tabPanel = new TabPanel();
35: tabPanel.setTabPosition(Position.BOTTOM);
36: tabPanel.setResizeTabs(true);
37: tabPanel.setMinTabWidth(115);
38: tabPanel.setTabWidth(135);
39: tabPanel.setActiveTab(0);
40:
41: Frame google = new Frame("http://www.google.com");
42:
43: Panel googlePanel = new Panel("Google");
44: googlePanel.setLayout(new FitLayout());
45: googlePanel.setIconCls("tab-icon");
46: googlePanel.add(google);
47:
48: Panel staticPanel = new Panel();
49: staticPanel.setTitle("News");
50: staticPanel.setAutoScroll(true);
51: staticPanel.setHtml(SampleData.getBogusMarkup());
52:
53: tabPanel.add(googlePanel);
54: tabPanel.add(staticPanel);
55:
56: panel.add(tabPanel);
57: }
58: return panel;
59: }
60:
61: public String getIntro() {
62: return "<p>This TabPanel demonstrates:</p>" + " <p>"
63: + " - Bottom tab position<br>"
64: + " - Adding an IFrame to a Tab<br>"
65: + " </p>";
66: }
67: }
|