Package com._1c.g5.aef2.lwt
Class LwtRenderer
java.lang.Object
com._1c.g5.aef2.renderers.Renderer<ILightControl,LwtRenderingParameters>
com._1c.g5.aef2.lwt.LwtRenderer
- All Implemented Interfaces:
IRenderer<LwtRenderingParameters>
- Direct Known Subclasses:
LwtStandardRenderer
Base class for LWT renderers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <VM extends IControlViewModel>
ILightControlcreateLightControl(IView<LwtRenderingParameters, VM, ILightControl> view, VM viewModel, ILightComposite lightComposite, int index) Creates a light control for the given view and view model.voiddispose()Disposes this renderer.protected voiddisposeLightControl(ILightControl lightControl) Disposes the given light control.protected StringReturns the target identifier of the renderer.voidinitialize(LwtRenderingParameters parameters) Initialized the renderer with the given parameters.voidrelayout()Triggers layout processing.voidrender(Iterable<IViewModel> viewModels) Renders the provided view models.protected booleanviewCanBeReused(IView<?, ?, ?> view, IViewModel oldViewModel, IViewModel newViewModel) Checks if the specified view associated with theoldViewModelcan be reused for the givennewViewModel.Methods inherited from class com._1c.g5.aef2.renderers.Renderer
applyLayout, convertLayout, convertLayoutData, createView, findViewClass, getParameters, getTreeTransformation, loadMappings, setMapping, setTreeTransformation
-
Constructor Details
-
LwtRenderer
public LwtRenderer()
-
-
Method Details
-
initialize
Description copied from class:RendererInitialized the renderer with the given parameters.To load view model to view mappings from the extension point, call
Renderer.loadMappings(String).- Specified by:
initializein interfaceIRenderer<LwtRenderingParameters>- Overrides:
initializein classRenderer<ILightControl,LwtRenderingParameters> - Parameters:
parameters- the renderer parameters.
-
relayout
public void relayout()Description copied from interface:IRendererTriggers layout processing. -
render
Description copied from interface:IRendererRenders the provided view models.- Parameters:
viewModels- the view models to render.
-
dispose
public void dispose()Description copied from interface:IRendererDisposes this renderer. -
createLightControl
protected <VM extends IControlViewModel> ILightControl createLightControl(IView<LwtRenderingParameters, VM, ILightControl> view, VM viewModel, ILightComposite lightComposite, int index) Creates a light control for the given view and view model.- Parameters:
view- the view to create a light control for.viewModel- the view model to create a light control from.lightComposite- the light composite.index- the created child index.- Returns:
- the newly created light control.
-
disposeLightControl
Disposes the given light control.- Parameters:
lightControl- the light control to dispose.
-
getTargetId
Description copied from class:RendererReturns 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:
getTargetIdin classRenderer<ILightControl,LwtRenderingParameters> - Returns:
- the target id
-
viewCanBeReused
protected boolean viewCanBeReused(IView<?, ?, ?> view, IViewModel oldViewModel, IViewModel newViewModel) Checks if the specified view associated with theoldViewModelcan be reused for the givennewViewModel.Default implementation always returns
false.- Parameters:
view- the view associated with theoldViewModel, cannot benull.oldViewModel- the old view model, cannot benull.newViewModel- the new view model, cannot benull.- Returns:
trueif the view can be reused for thenewViewModel,false- otherwise.
-