summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/FormLayout.java
blob: c0be784a7b7f4ccb2829541df19c7cc9ff827bf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* 
@VaadinApache2LicenseForJavaFiles@
 */

package com.vaadin.ui;

/**
 * FormLayout is used by {@link Form} to layout fields. It may also be used
 * separately without {@link Form}.
 * 
 * FormLayout is a close relative to vertical {@link OrderedLayout}, but in
 * FormLayout caption is rendered on left side of component. Required and
 * validation indicators are between captions and fields.
 * 
 * FormLayout does not currently support some advanced methods from
 * OrderedLayout like setExpandRatio and setComponentAlignment.
 * 
 * FormLayout by default has component spacing on. Also margin top and margin
 * bottom are by default on.
 * 
 */
public class FormLayout extends AbstractOrderedLayout {

    public FormLayout() {
        super();
        setSpacing(true);
        setMargin(true, false, true, false);
        setWidth(100, UNITS_PERCENTAGE);
    }

}