public interface AdvancedWidgetProcessor<W,M extends W> extends WidgetProcessor<W,M>
There are advantages to keeping the vanilla WidgetProcessor interface as a
single-method interface: First, it alleviates the need for a BaseWidgetProcessor or
WidgetProcessorAdapter class (to provide default implementations for subclasses who
don't override all the methods); second, it makes WidgetProcessor an example of the
Strategy pattern; third, it makes WidgetProcessor amenable to automatic function
objects (part of closures in Java 7). This latter point is especially useful when using
WidgetProcessors to attach event handlers.
| 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 the
WidgetBuilder is called. |
processWidgetvoid onStartBuild(M metawidget)
WidgetBuilder is called. WidgetProcessors 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. WidgetProcessors 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.