Class SwtStandardRenderer
- java.lang.Object
-
- com._1c.g5.aef2.renderers.Renderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
-
- com._1c.g5.aef2.swt.renderers.SwtRenderer
-
- com._1c.g5.aef2.standard.swt.renderers.SwtStandardRenderer
-
- All Implemented Interfaces:
IRenderer<SwtRenderingParameters>
- Direct Known Subclasses:
DtSwtRenderer
,SwtPropertyPaletteRenderer
public class SwtStandardRenderer extends SwtRenderer
SWT standard controls renderer.
-
-
Constructor Summary
Constructors Constructor Description SwtStandardRenderer()
Instantiates a new SWT standard renderer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyLayout(IControlViewModel viewModel, org.eclipse.swt.widgets.Widget nativeControl)
Applies a layout to the given native control.protected org.eclipse.swt.widgets.Layout
convertLayout(IAefLayout layout, org.eclipse.swt.widgets.Widget nativeControl)
Converts the AEF layout to layout for the given native control.protected Object
convertLayoutData(IAefLayoutData layoutData, org.eclipse.swt.widgets.Widget nativeControl)
Converts the AEF layout data to layout data for the given native control.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.protected void
disposeNativeControl(org.eclipse.swt.widgets.Widget nativeControl)
Disposes the given native control.static IEventChannel
getFocusedEventChannel()
void
render(Iterable<IViewModel> viewModels)
Renders the provided view models.-
Methods inherited from class com._1c.g5.aef2.swt.renderers.SwtRenderer
dispose, getTargetId, initialize, relayout
-
Methods inherited from class com._1c.g5.aef2.renderers.Renderer
createView, findViewClass, getParameters, getTreeTransformation, loadMappings, setMapping, setTreeTransformation
-
-
-
-
Method Detail
-
getFocusedEventChannel
public static IEventChannel getFocusedEventChannel()
- Returns:
- the
IEventChannel
for the focused view.
-
render
public void render(Iterable<IViewModel> viewModels)
Description copied from interface:IRenderer
Renders the provided view models.- Specified by:
render
in interfaceIRenderer<SwtRenderingParameters>
- Overrides:
render
in classSwtRenderer
- Parameters:
viewModels
- the view models to render.
-
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. Adds the focus listener for key-binding support.- Overrides:
createNativeControl
in classSwtRenderer
- 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. Remove the focus listener about key-binding support.- Overrides:
disposeNativeControl
in classSwtRenderer
- Parameters:
nativeControl
- the native control to dispose.
-
applyLayout
protected void applyLayout(IControlViewModel viewModel, org.eclipse.swt.widgets.Widget nativeControl)
Description copied from class:Renderer
Applies a layout to the given native control.- Specified by:
applyLayout
in classRenderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
- Parameters:
viewModel
- the associated view model.nativeControl
- the native control to apply layout to.
-
convertLayout
protected org.eclipse.swt.widgets.Layout convertLayout(IAefLayout layout, org.eclipse.swt.widgets.Widget nativeControl)
Description copied from class:Renderer
Converts the AEF layout to layout for the given native control.- Specified by:
convertLayout
in classRenderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
- Parameters:
layout
- the AEF layout.- Returns:
- the converted layout object.
-
convertLayoutData
protected Object convertLayoutData(IAefLayoutData layoutData, org.eclipse.swt.widgets.Widget nativeControl)
Description copied from class:Renderer
Converts the AEF layout data to layout data for the given native control.- Specified by:
convertLayoutData
in classRenderer<org.eclipse.swt.widgets.Widget,SwtRenderingParameters>
- Parameters:
layoutData
- the AEF layout data.- Returns:
- the converted layout data object.
-
-