diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-11-10 13:56:56 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-11-10 13:56:56 +0000 |
commit | df32c7dda4e7755293778fdfdd999a722e1f3cb9 (patch) | |
tree | 5079fb5d222819a5628e640480c0bd8b6803dd62 /src/com/itmill/toolkit/ui/FormLayout.java | |
parent | 0191f9fdefca58494e17502de447cd92bd6e8cf5 (diff) | |
download | vaadin-framework-df32c7dda4e7755293778fdfdd999a722e1f3cb9.tar.gz vaadin-framework-df32c7dda4e7755293778fdfdd999a722e1f3cb9.zip |
Some documentation and better defaults for formlayout
svn changeset:5849/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/FormLayout.java')
-rw-r--r-- | src/com/itmill/toolkit/ui/FormLayout.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/ui/FormLayout.java b/src/com/itmill/toolkit/ui/FormLayout.java index fe972db98b..d822887fa9 100644 --- a/src/com/itmill/toolkit/ui/FormLayout.java +++ b/src/com/itmill/toolkit/ui/FormLayout.java @@ -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"; } |