public interface AdvancedLayout<W,C extends W,M extends C> extends Layout<W,C,M>
There are advantages to keeping the vanilla Layout
interface as a single-method
interface: First, it alleviates the need for a BaseLayout
or
LayoutAdapter
class (to provide default implementations for subclasses who don't
override all the methods); second, it makes Layout
an example of the Strategy
pattern; third, it makes Layout
amenable to automatic function objects (part of
closures in Java 7). This latter point is more of a concession to consistency with
WidgetProcessor
and the other interfaces in the pipeline, but may still prove
useful.
Modifier and Type | Method and Description |
---|---|
void |
endContainerLayout(C container,
M metawidget)
Finish the given container, using the given Metawidget to access additional services if
needed (such as state saving).
|
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. |
void |
startContainerLayout(C container,
M metawidget)
Initialise the given container, using the given Metawidget to access additional services if
needed (such as state saving).
|
layoutWidget
void onStartBuild(M metawidget)
WidgetBuilder
is called. Layout
s may wish to act on this event to
initialize themselves ready for processing, or to perform 'outermost-container-only'
processing, such as adding facets. This event is only called once per inspection, not once
per widget built.metawidget
- the parent Metawidget. Never nullvoid startContainerLayout(C container, M metawidget)
container
- the container to layout. This is often the same as the given Metawidgetmetawidget
- the parent Metawidget. Never nullvoid endContainerLayout(C container, M metawidget)
container
- the container to layout. This is often the same as the given Metawidgetmetawidget
- the Metawidget to use to access additional services. Never nullvoid onEndBuild(M metawidget)
Layout
. Layout
s may wish to act on this event to clean
themselves up after processing, or to perform 'outermost-container-only' processing, such as
adding facets. This event is only called once per inspection, not once per widget built.metawidget
- the parent Metawidget. Never nullCopyright © 2015. All Rights Reserved.