Class LwtRenderer

All Implemented Interfaces:
IRenderer<LwtRenderingParameters>
Direct Known Subclasses:
LwtStandardRenderer

public abstract class LwtRenderer extends Renderer<ILightControl,LwtRenderingParameters>
Base class for LWT renderers.
  • Constructor Details

    • LwtRenderer

      public LwtRenderer()
  • Method Details

    • initialize

      public void initialize(LwtRenderingParameters parameters)
      Description copied from class: Renderer
      Initialized the renderer with the given parameters.

      To load view model to view mappings from the extension point, call Renderer.loadMappings(String).

      Specified by:
      initialize in interface IRenderer<LwtRenderingParameters>
      Overrides:
      initialize in class Renderer<ILightControl,LwtRenderingParameters>
      Parameters:
      parameters - the renderer parameters.
    • relayout

      public void relayout()
      Description copied from interface: IRenderer
      Triggers layout processing.
    • render

      public void render(Iterable<IViewModel> viewModels)
      Description copied from interface: IRenderer
      Renders the provided view models.
      Parameters:
      viewModels - the view models to render.
    • dispose

      public void dispose()
      Description copied from interface: IRenderer
      Disposes this renderer.
    • createLightControl

      protected <VM extends IControlViewModel> ILightControl createLightControl(IView<LwtRenderingParameters,VM,ILightControl> view, VM viewModel, ILightComposite lightComposite, int index)
      Creates a light control for the given view and view model.
      Parameters:
      view - the view to create a light control for.
      viewModel - the view model to create a light control from.
      lightComposite - the light composite.
      index - the created child index.
      Returns:
      the newly created light control.
    • disposeLightControl

      protected void disposeLightControl(ILightControl lightControl)
      Disposes the given light control.
      Parameters:
      lightControl - the light control to dispose.
    • getTargetId

      protected String getTargetId()
      Description copied from class: Renderer
      Returns the target identifier of the renderer.

      This identifier will be used to obtain view model to view mappings from the extension point in Renderer.loadMappings(String).

      Examples:

      • swt
      • lwt
      Specified by:
      getTargetId in class Renderer<ILightControl,LwtRenderingParameters>
      Returns:
      the target id
    • viewCanBeReused

      protected boolean viewCanBeReused(IView<?,?,?> view, IViewModel oldViewModel, IViewModel newViewModel)
      Checks if the specified view associated with the oldViewModel can be reused for the given newViewModel.

      Default implementation always returns false.

      Parameters:
      view - the view associated with the oldViewModel, cannot be null.
      oldViewModel - the old view model, cannot be null.
      newViewModel - the new view model, cannot be null.
      Returns:
      true if the view can be reused for the newViewModel, false - otherwise.