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