|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.twenty11.skysail.common.forms.FormBuilder
public abstract class FormBuilder
Subclasses have to implement the configure method, which typically looks
something like // TODO
This is a domain-specific-language style which lets you define a chain of
columns. The typical use is to create an anonymous inner class like in this
snippet form.setFormBuilder(new FormBuilder(...) {...});. This
use case doesn't have to deal with concurrency issues, so no special care is
taken to make this class ThreadSafe.
| Constructor Summary | |
|---|---|
FormBuilder()
|
|
| Method Summary | |
|---|---|
FieldDefinition |
addField(String fieldName,
FieldType type)
Add a new field to the chain. |
abstract void |
configure()
The central method to configure the chain of columns. |
Map<String,FieldDefinition> |
getColumns()
|
Map<String,FieldDefinition> |
getFields()
return the current chain of columns. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FormBuilder()
| Method Detail |
|---|
public abstract void configure()
public final FieldDefinition addField(String fieldName,
FieldType type)
type - html typefieldName - the name of the new column
public final Map<String,FieldDefinition> getFields()
public final String toString()
toString in class Objectpublic Map<String,FieldDefinition> getColumns()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||