Package com._1c.g5.aef2.swt.renderers
Class SwtRenderer
- java.lang.Object
-
- com._1c.g5.aef2.renderers.Renderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
-
- com._1c.g5.aef2.swt.renderers.SwtRenderer
-
- All Implemented Interfaces:
IRenderer<SwtRenderingParameters>
- Direct Known Subclasses:
SwtStandardRenderer
public abstract class SwtRenderer extends Renderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
Base class for SWT renderers.
-
-
Constructor Summary
Constructors Constructor Description SwtRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <VM extends IControlViewModel>
org.eclipse.swt.widgets.WidgetcreateNativeControl(IView<SwtRenderingParameters,VM,org.eclipse.swt.widgets.Widget> view, VM viewModel, org.eclipse.swt.widgets.Composite composite)
Creates a native control for the given view, view model and composite.void
dispose()
Disposes this renderer.protected void
disposeNativeControl(org.eclipse.swt.widgets.Widget nativeControl)
Disposes the given native control.protected String
getTargetId()
Returns the target identifier of the renderer.void
initialize(SwtRenderingParameters parameters)
Initialized the renderer with the given parameters.void
relayout()
Triggers layout processing.void
render(Iterable<IViewModel> viewModels)
Renders the provided view models.-
Methods inherited from class com._1c.g5.aef2.renderers.Renderer
applyLayout, convertLayout, convertLayoutData, createView, findViewClass, getParameters, getTreeTransformation, loadMappings, setMapping, setTreeTransformation
-
-
-
-
Method Detail
-
initialize
public void initialize(SwtRenderingParameters parameters)
Description copied from class:Renderer
Initialized the renderer with the given parameters.To load view model to view mappings from the extension point, call
Renderer.loadMappings(String)
.- Specified by:
initialize
in interfaceIRenderer<SwtRenderingParameters>
- Overrides:
initialize
in classRenderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
- Parameters:
parameters
- the renderer parameters.
-
relayout
public void relayout()
Description copied from interface:IRenderer
Triggers layout processing.
-
render
public void render(Iterable<IViewModel> viewModels)
Description copied from interface:IRenderer
Renders the provided view models.- Parameters:
viewModels
- the view models to render.
-
dispose
public void dispose()
Description copied from interface:IRenderer
Disposes this renderer.
-
getTargetId
protected String getTargetId()
Description copied from class:Renderer
Returns the target identifier of the renderer.This identifier will be used to obtain view model to view mappings from the extension point in
Renderer.loadMappings(String)
.Examples:
- swt
- lwt
- Specified by:
getTargetId
in classRenderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
- Returns:
- the target id
-
createNativeControl
protected <VM extends IControlViewModel> org.eclipse.swt.widgets.Widget createNativeControl(IView<SwtRenderingParameters,VM,org.eclipse.swt.widgets.Widget> view, VM viewModel, org.eclipse.swt.widgets.Composite composite)
Creates a native control for the given view, view model and composite.- Parameters:
view
- the view to create a native control for.viewModel
- the view model to create a native control from.composite
- the SWT composite to create a native control in.- Returns:
-
disposeNativeControl
protected void disposeNativeControl(org.eclipse.swt.widgets.Widget nativeControl)
Disposes the given native control.- Parameters:
nativeControl
- the native control to dispose.
-
-