public abstract class SwtNestedSectionLayoutDecorator extends NestedSectionLayoutDecorator<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget> implements SwtLayoutDecorator
NestedSectionLayoutDecorator.State<C>
Modifier | Constructor and Description |
---|---|
protected |
SwtNestedSectionLayoutDecorator(LayoutDecoratorConfig<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget> config) |
Modifier and Type | Method and Description |
---|---|
protected NestedSectionLayoutDecorator.State<org.eclipse.swt.widgets.Composite> |
getState(org.eclipse.swt.widgets.Composite container,
SwtMetawidget metawidget) |
protected boolean |
isIgnored(org.eclipse.swt.widgets.Control control) |
void |
layoutWidget(org.eclipse.swt.widgets.Control widget,
String elementName,
Map<String,String> attributes,
org.eclipse.swt.widgets.Composite container,
SwtMetawidget 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)
|
org.eclipse.swt.widgets.Composite |
startBuildWidget(String elementName,
Map<String,String> attributes,
org.eclipse.swt.widgets.Composite container,
SwtMetawidget metawidget) |
void |
startContainerLayout(org.eclipse.swt.widgets.Composite container,
SwtMetawidget metawidget)
Initialise the given container, using the given Metawidget to access additional services if
needed (such as state saving).
|
protected String |
stripSection(Map<String,String> attributes) |
createSectionWidget, endContainerLayout
getDelegate, onEndBuild, onStartBuild
protected SwtNestedSectionLayoutDecorator(LayoutDecoratorConfig<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget> config)
public void startContainerLayout(org.eclipse.swt.widgets.Composite container, SwtMetawidget metawidget)
AdvancedLayout
startContainerLayout
in interface AdvancedLayout<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget>
startContainerLayout
in class NestedSectionLayoutDecorator<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget>
container
- the container to layout. This is often the same as the given Metawidgetmetawidget
- the parent Metawidget. Never nullpublic org.eclipse.swt.widgets.Composite startBuildWidget(String elementName, Map<String,String> attributes, org.eclipse.swt.widgets.Composite container, SwtMetawidget metawidget)
startBuildWidget
in interface SwtLayoutDecorator
public void layoutWidget(org.eclipse.swt.widgets.Control widget, String elementName, Map<String,String> attributes, org.eclipse.swt.widgets.Composite container, SwtMetawidget 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<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget>
layoutWidget
in class NestedSectionLayoutDecorator<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget>
widget
- 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
nullprotected String stripSection(Map<String,String> attributes)
stripSection
in class NestedSectionLayoutDecorator<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget>
protected NestedSectionLayoutDecorator.State<org.eclipse.swt.widgets.Composite> getState(org.eclipse.swt.widgets.Composite container, SwtMetawidget metawidget)
getState
in class NestedSectionLayoutDecorator<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget>
protected boolean isIgnored(org.eclipse.swt.widgets.Control control)
isIgnored
in class NestedSectionLayoutDecorator<org.eclipse.swt.widgets.Control,org.eclipse.swt.widgets.Composite,SwtMetawidget>
Copyright © 2015. All Rights Reserved.