Package com._1c.g5.aef2.lwt.views
Class LwtView<VM extends IControlViewModel,LC extends ILightControl>
- All Implemented Interfaces:
IView<LwtRenderingParameters,
VM, LC>
- Direct Known Subclasses:
AbstractLwtStandardView
public abstract class LwtView<VM extends IControlViewModel,LC extends ILightControl>
extends View<LwtRenderingParameters,VM,LC>
Base class for lightweight-base views in AEF.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract LC
createLightControl
(ILightComposite lightComposite, VM viewModel) Creates light control.static final ILightComposite
getContentControl
(ILightControl control) Obtains the light control that represents the actual content.protected void
handleFocusEvent
(FocusEvent event, VM viewModel, LC control) HandlesFocusEvent
.protected final boolean
isControlDisposed
(LC control) Returnstrue
if native control is disposed.static final void
setContentControl
(ILightControl control, ILightComposite content) Associates the composite content control with the given light control.protected final void
uiAsyncExec
(Runnable runnable) Executes the givenrunnable
in UI thread only if the control and its display are not disposed.protected final void
uiSyncExec
(Runnable runnable) Executes the givenrunnable
in UI thread only if the control and its display are not disposed.Methods inherited from class com._1c.g5.aef2.views.View
bind, bindListener, bindNativeControl, bindValue, bindValue, bindViewModel, getNativeControl, getParameters, getViewModel, handleEventChannelEvent, initialize, manageObservable, queueAndWaitEvent, queueEvent, registerEventChannelListener, unbind, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
Constructor Details
-
LwtView
public LwtView()
-
-
Method Details
-
createLightControl
Creates light control.- Parameters:
lightComposite
- the light composite.viewModel
- the view view model.- Returns:
- the newly created control.
-
getContentControl
Obtains the light control that represents the actual content.- Parameters:
control
- theILightControl
.- Returns:
- the content control.
-
setContentControl
Associates the composite content control with the given light control.- Parameters:
control
- theILightControl
.content
- the content control.
-
handleFocusEvent
Description copied from class:View
HandlesFocusEvent
.- Specified by:
handleFocusEvent
in classView<LwtRenderingParameters,
VM extends IControlViewModel, LC extends ILightControl> - Parameters:
event
- the focus event, cannot benull
.viewModel
- the view model, cannot benull
.control
- the native control, cannot benull
.
-
isControlDisposed
Description copied from class:View
Returnstrue
if native control is disposed.- Specified by:
isControlDisposed
in classView<LwtRenderingParameters,
VM extends IControlViewModel, LC extends ILightControl> - Parameters:
control
- the native control, cannot benull
.- Returns:
true
if native control is disposed,false
- otherwise.
-
uiSyncExec
Executes the givenrunnable
in UI thread only if the control and its display are not disposed. The thread which calls this method is suspended until the runnable completes.- Parameters:
runnable
- the runnable to execute, cannot benull
.
-
uiAsyncExec
Executes the givenrunnable
in UI thread only if the control and its display are not disposed. The caller of this method continues to run in parallel.- Parameters:
runnable
- the runnable to execute, cannot benull
.
-