|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.twenty11.skysail.common.grids.ColumnsBuilder
public abstract class ColumnsBuilder
Subclasses have to implement the configure method, which typically looks something like
addColumn("col1").setWidth(100).addColumn("col2")...
This class is meant to be used a domain-specific-language style which lets you define a chain of columns and provide
specific details to each column. The typical use is to create an anonymous inner class like in this snippet
gridData.setColumnsBuilder(new ColumnsBuilder(...) {...});. This use case doesn't have to deal with
concurrency issues, so no special care is taken to make this class ThreadSafe.
| Constructor Summary | |
|---|---|
ColumnsBuilder()
Creates a new ColumnsBuilder object which gets a map of parameters. |
|
| Method Summary | |
|---|---|
ColumnDefinition |
addColumn(String name)
Add a new column to the chain. |
abstract void |
configure()
The central method to configure the chain of columns. |
List<ColumnDefinition> |
getColumns()
return the chain of columns (which should have been created in the configure method). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ColumnsBuilder()
| Method Detail |
|---|
public abstract void configure()
public final ColumnDefinition addColumn(String name)
name - the name of the new column
public final List<ColumnDefinition> getColumns()
public final String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||