public interface AdvancedWidgetBuilder<W,M extends W> extends WidgetBuilder<W,M>
There are advantages to keeping the vanilla WidgetBuilder interface as a
single-method interface: First, it alleviates the need for a BaseWidgetBuilder or
WidgetBuilderAdapter class (to provide default implementations for subclasses who
don't override all the methods); second, it makes WidgetBuilder an example of the
Strategy pattern; third, it makes WidgetBuilder amenable to automatic function
objects (part of closures in Java 7).
| Modifier and Type | Method and Description |
|---|---|
void |
onEndBuild(M metawidget)
Event called at the end of widget building, after all widgets have been built and added to
the
Layout. |
void |
onStartBuild(M metawidget)
Event called at the start of the widget building process, before any
WidgetBuilders are called. |
buildWidgetvoid onStartBuild(M metawidget)
WidgetBuilders are called. WidgetBuilders may wish to act on this
event to initialize themselves ready for processing. This event is only called once per
inspection, not once per widget built.metawidget - the parent Metawidget. Never nullvoid onEndBuild(M metawidget)
Layout. WidgetBuilderss may wish to act on this event to clean
themselves up after processing. This event is only called once per inspection, not once per
widget built.metawidget - the parent Metawidget. Never nullCopyright © 2015. All Rights Reserved.