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 LCcreateLightControl(ILightComposite lightComposite, VM viewModel) Creates light control.static final ILightCompositegetContentControl(ILightControl control) Obtains the light control that represents the actual content.protected voidhandleFocusEvent(FocusEvent event, VM viewModel, LC control) HandlesFocusEvent.protected final booleanisControlDisposed(LC control) Returnstrueif native control is disposed.static final voidsetContentControl(ILightControl control, ILightComposite content) Associates the composite content control with the given light control.protected final voiduiAsyncExec(Runnable runnable) Executes the givenrunnablein UI thread only if the control and its display are not disposed.protected final voiduiSyncExec(Runnable runnable) Executes the givenrunnablein 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:ViewHandlesFocusEvent.- Specified by:
handleFocusEventin 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:ViewReturnstrueif native control is disposed.- Specified by:
isControlDisposedin classView<LwtRenderingParameters,VM extends IControlViewModel, LC extends ILightControl> - Parameters:
control- the native control, cannot benull.- Returns:
trueif native control is disposed,false- otherwise.
-
uiSyncExec
Executes the givenrunnablein 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 givenrunnablein 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.
-