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 Details

    • LwtView

      public LwtView()
  • Method Details

    • 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 - the ILightControl.
      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 - the ILightControl.
      content - the content control.
    • handleFocusEvent

      protected void handleFocusEvent(FocusEvent event, VM viewModel, LC control)
      Description copied from class: View
      Handles FocusEvent.
      Specified by:
      handleFocusEvent in class View<LwtRenderingParameters,VM extends IControlViewModel,LC extends ILightControl>
      Parameters:
      event - the focus event, cannot be null.
      viewModel - the view model, cannot be null.
      control - the native control, cannot be null.
    • isControlDisposed

      protected final boolean isControlDisposed(LC control)
      Description copied from class: View
      Returns true if native control is disposed.
      Specified by:
      isControlDisposed in class View<LwtRenderingParameters,VM extends IControlViewModel,LC extends ILightControl>
      Parameters:
      control - the native control, cannot be null.
      Returns:
      true if native control is disposed, false - otherwise.
    • uiSyncExec

      protected final void uiSyncExec(Runnable runnable)
      Executes the given runnable 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 be null.
    • uiAsyncExec

      protected final void uiAsyncExec(Runnable runnable)
      Executes the given runnable 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 be null.