Class StatelessElement
- Since:
- 6.2.0
- Version:
- 1.0.0
- Author:
- UltiTools Team
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.ultikits.ultitools.abstracts.gui.declarative.core.ComponentElement
getChildren, performRebuild, unmountMethods inherited from class com.ultikits.ultitools.abstracts.gui.declarative.core.Element
addChild, assignContext, canUpdate, clearDirty, getContext, getParent, getWidget, isDirty, isMounted, markChildNeedsBuild, markNeedsBuild, setRootBuildScheduler, toString, update, updateChild, updateChildren
-
Constructor Details
-
StatelessElement
-
-
Method Details
-
mount
Description copied from class:ElementMounts this Element into the tree.Called the first time the Element is inserted into the tree. Subclasses should perform initialization work here and mount their child Elements.
CR-01 (T-05-62 / #371): every
mount(Element)override in this codebase callssuper.mount(parent)before doing its own work (mounting children, running the firstperformRebuild(), etc.) -- this base method is therefore the single choke point through which the ENTIRE mounting recursion passes, one call per Element, regardless of subtype:ContainerElement/GridViewElement.mountChildren()callingchildElement.mount(this)for each child, and themount()->performRebuild()->updateChild()->mount()cascadeStatelessElement/StatefulElementdrive when composing a child Widget for the first time. Checking the depth HERE, rather than separately in every subclass's own mounting method, guards the mount recursion exactly once per node without needing to duplicate the check at each override.update()/unmount()'s own recursions need no separate guard: they only ever walk a subtree whose depth was already validated here when it was first mounted, so they can never exceedRenderDepthGuard.MAX_DEPTHwithout first passing through an unguardedmount()call -- which this check closes.- Overrides:
mountin classComponentElement- Parameters:
parent- the parent Element, or null if this is the root Element
-
build
Description copied from class:ComponentElementBuilds the child Widget.- Specified by:
buildin classComponentElement- Returns:
- the child Widget
-