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.layout;
09:
10: import com.gwtext.client.widgets.Panel;
11: import com.gwtext.client.widgets.layout.HorizontalLayout;
12: import com.gwtext.client.widgets.layout.VerticalLayout;
13: import com.gwtext.sample.showcase2.client.ShowcasePanel;
14:
15: public class VerticalLayoutSample extends ShowcasePanel {
16:
17: public String getSourceUrl() {
18: return "source/layout/VerticalLayoutSample.java.html";
19: }
20:
21: public Panel getViewPanel() {
22: if (panel == null) {
23:
24: panel = new Panel();
25: panel.setLayout(new VerticalLayout(15));
26:
27: panel.add(new Panel("Item 1", 150, 100));
28: panel.add(new Panel("Item 2", 350, 75));
29: panel.add(new Panel("Item 3", 150, 100));
30: panel.add(new Panel("Item 3", 150, 150));
31: }
32: return panel;
33: }
34:
35: public String getIntro() {
36: return "A simple example of VerticalLayout used to lay out Panels vertically with 15px between them.";
37: }
38: }
|