Package com._1c.g5.aef2.lwt.views
Class LwtView<VM extends IControlViewModel,LC extends ILightControl>
- java.lang.Object
-
- com._1c.g5.aef2.views.View<LwtRenderingParameters,VM,LC>
-
- com._1c.g5.aef2.lwt.views.LwtView<VM,LC>
-
- 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 Constructor Description LwtView()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract LC
createLightControl(ILightComposite lightComposite, VM viewModel)
Creates light control.static ILightComposite
getContentControl(ILightControl control)
Obtains the light control that represents the actual content.protected void
handleFocusEvent(FocusEvent event, VM viewModel, LC control)
HandlesFocusEvent
.protected boolean
isControlDisposed(LC control)
Returnstrue
if native control is disposed.static void
setContentControl(ILightControl control, ILightComposite content)
Associates the composite content control with the given light control.protected void
uiAsyncExec(Runnable runnable)
Executes the givenrunnable
in UI thread only if the control and its display are not disposed.protected 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
-
-
-
-
Method Detail
-
createLightControl
public abstract LC createLightControl(ILightComposite lightComposite, VM viewModel)
Creates light control.- Parameters:
lightComposite
- the light composite.viewModel
- the view view model.- Returns:
- the newly created control.
-
getContentControl
public static final ILightComposite getContentControl(ILightControl control)
Obtains the light control that represents the actual content.- Parameters:
control
- theILightControl
.- Returns:
- the content control.
-
setContentControl
public static final void setContentControl(ILightControl control, ILightComposite content)
Associates the composite content control with the given light control.- Parameters:
control
- theILightControl
.content
- the content control.
-
handleFocusEvent
protected void handleFocusEvent(FocusEvent event, VM viewModel, LC control)
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
protected final boolean isControlDisposed(LC control)
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
protected final void uiSyncExec(Runnable runnable)
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
protected final void uiAsyncExec(Runnable runnable)
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
.
-
-