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.client.widgets.layout;
09:
10: /**
11: * Vertical layout that allows you to add components vertically with the specified spacing betwen them.
12: */
13: public class VerticalLayout extends TableLayout {
14:
15: /**
16: * Createa new VerticalLayout with no spacing.
17: */
18: public VerticalLayout() {
19: setColumns(1);
20: }
21:
22: /**
23: * Create a new VerticalLayout with the specified spacing between components added.
24: *
25: * @param spacing the spacing between components
26: */
27: public VerticalLayout(int spacing) {
28: setColumns(1);
29: setSpacing("padding:0 0 " + spacing + "px 0");
30: }
31:
32: public final void setColumns(int columns) {
33: super.setColumns(columns);
34: }
35: }
|