public class HorizontalLayout extends Object implements AdvancedLayout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget>
HorizontalLayout
.Constructor and Description |
---|
HorizontalLayout() |
Modifier and Type | Method and Description |
---|---|
void |
endContainerLayout(com.vaadin.ui.ComponentContainer container,
VaadinMetawidget metawidget)
Finish the given container, using the given Metawidget to access additional services if
needed (such as state saving).
|
void |
layoutWidget(com.vaadin.ui.Component component,
String elementName,
Map<String,String> attributes,
com.vaadin.ui.ComponentContainer container,
VaadinMetawidget metawidget)
Layout the given widget within the given container, using the given
elementName and attributes as a guide and the given Metawidget to access
additional services if needed (such as state saving)
|
void |
onEndBuild(VaadinMetawidget metawidget)
Event called at the end of widget building, after all widgets have been built and added to
the
Layout . |
void |
onStartBuild(VaadinMetawidget metawidget)
Event called at the start of the widget building process, before the
WidgetBuilder is called. |
void |
startContainerLayout(com.vaadin.ui.ComponentContainer container,
VaadinMetawidget metawidget)
Initialise the given container, using the given Metawidget to access additional services if
needed (such as state saving).
|
public void onStartBuild(VaadinMetawidget metawidget)
AdvancedLayout
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.onStartBuild
in interface AdvancedLayout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget>
metawidget
- the parent Metawidget. Never nullpublic void startContainerLayout(com.vaadin.ui.ComponentContainer container, VaadinMetawidget metawidget)
AdvancedLayout
startContainerLayout
in interface AdvancedLayout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget>
container
- the container to layout. This is often the same as the given Metawidgetmetawidget
- the parent Metawidget. Never nullpublic void layoutWidget(com.vaadin.ui.Component component, String elementName, Map<String,String> attributes, com.vaadin.ui.ComponentContainer container, VaadinMetawidget metawidget)
Layout
layoutWidget is called immediately after WidgetBuilder.buildWidget and WidgetProcessor.processWidget, and before the next widget is generated. An alternate design would be to 'collect' all widgets generated by buildWidget and processWidget, then iterate over them separately for the layout. If you prefer this approach, you can simulate it by having layoutWidget do nothing but 'remember' each widget, then iterate over them in endContainerLayout (see the AdvancedLayout interface). However not all UI frameworks allow this approach, because they do not suport widgets being instantiated independent of a layout, nor moved between layouts (e.g. SWT)
layoutWidget
in interface Layout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget>
component
- the widget to layout. Never nullelementName
- XML node name of the business field. Typically 'entity',
'property' or 'action'. Never nullattributes
- attributes of the widget to layout. Never null. This Map is
modifiable - changes will be passed to subsequent
WidgetProcessors and Layoutscontainer
- the container to add to. This is often the same as the given
Metawidgetmetawidget
- the Metawidget to use to access additional services. Never
nullpublic void endContainerLayout(com.vaadin.ui.ComponentContainer container, VaadinMetawidget metawidget)
AdvancedLayout
endContainerLayout
in interface AdvancedLayout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget>
container
- the container to layout. This is often the same as the given Metawidgetmetawidget
- the Metawidget to use to access additional services. Never nullpublic void onEndBuild(VaadinMetawidget metawidget)
AdvancedLayout
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.onEndBuild
in interface AdvancedLayout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget>
metawidget
- the parent Metawidget. Never nullCopyright © 2015. All Rights Reserved.