]> source.dussan.org Git - vaadin-framework.git/commitdiff
Some documentation and better defaults for formlayout
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 10 Nov 2008 13:56:56 +0000 (13:56 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 10 Nov 2008 13:56:56 +0000 (13:56 +0000)
svn changeset:5849/svn branch:trunk

src/com/itmill/toolkit/ui/FormLayout.java

index fe972db98b90952d004002c4cb0fad8dfd26f41c..d822887fa91c542d221f35adbc9294487b8ff4fe 100644 (file)
@@ -4,8 +4,29 @@
 
 package com.itmill.toolkit.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 OrderedLayout {
 
+    public FormLayout() {
+        super();
+        setSpacing(true);
+        setMargin(true, false, true, false);
+    }
+
     public String getTag() {
         return "formlayout";
     }