Skip to content

MaterialDesignJsVeiwRenderer / view.core.renderers.viewRenderers.layouts / LayoutRenderer

LayoutRenderer

abstract class LayoutRenderer<L> :AbstractViewRenderer<L>

This is the base class for renderers that render layout views.

The procedure for rendering layout views goes as follows:

  1. The AbstractViewRenderer applies common view attributes.
  2. This class applies scrolling to the element
  3. Renders any newly added children or all children if the view is being rendered for the first time.
  4. Removes any child UI components that were removed from the layout view

Listener functions for child view rendering/removal so that subclassing layout renderers can apply layout specific positioning logic.

Constructors

<init>
LayoutRenderer(view:L)
This constructor is used when rendering the view for the first time.LayoutRenderer(view:L, element: <ERROR CLASS>, reRendering:Boolean= true)
This is the base class for renderers that render layout views.

Inherited Properties

css
val css:ElementCss

element
val element: <ERROR CLASS>
A HTMLElement that will represent the view.

reRendering
val reRendering:Boolean
If true, this parameter indicates that the element passed was already built. This happens when a view is already rendered and one of its properties changes later. In this case the renderer should only update the element and not rebuild it from scratch.

view
val view:V
The view to render

Functions

beforeChildIsRemoved
open fun beforeChildIsRemoved(childElement: <ERROR CLASS>):Boolean

buildElement
open fun buildElement():Unit

childCreated
open fun childCreated(child: <ERROR CLASS>, childElement: <ERROR CLASS>):Boolean

getChildElements
open fun getChildElements():List<<ERROR CLASS>>

getViewsToBeRemoved
open fun getViewsToBeRemoved():List<Int>

getViewsToBeRendered
open fun getViewsToBeRendered():List<Int>

removeChildren
open fun removeChildren():Unit

renderChildren
open fun renderChildren():Unit

Inherited Functions

renderView
open fun renderView(): <ERROR CLASS>
Builds a DOM element corresponding to the view.

Inheritors

GridLayoutRenderer
open class GridLayoutRenderer :LayoutRenderer<<ERROR CLASS>>

LinearLayoutRenderer
open class LinearLayoutRenderer :LayoutRenderer<<ERROR CLASS>>

RelativeLayoutRenderer
open class RelativeLayoutRenderer :LayoutRenderer<<ERROR CLASS>>