Class ContainerElement
- Since:
- 6.2.0
- Version:
- 1.0.0
- Author:
- UltiTools Team
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of child Elements.voidMounts this Element into the tree.private voidvoidPerforms a rebuild.voidunmount()Removes this Element from the tree.voidUpdates this Element with a new Widget.Methods inherited from class com.ultikits.ultitools.abstracts.gui.declarative.core.Element
addChild, assignContext, canUpdate, clearDirty, getContext, getParent, getWidget, isDirty, isMounted, markChildNeedsBuild, markNeedsBuild, setRootBuildScheduler, toString, updateChild, updateChildren
-
Field Details
-
childElements
-
-
Constructor Details
-
ContainerElement
-
-
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()mounting each child throughupdateChildren()andupdateChild(), 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. -
update
Description copied from class:ElementUpdates this Element with a new Widget.Called when the Widget rebuilds. Subclasses should update their reference to the Widget and perform any necessary updates.
-
performRebuild
public void performRebuild()Description copied from class:ElementPerforms a rebuild.Subclasses should implement this method to build or rebuild the Widget tree.
- Specified by:
performRebuildin classElement
-
unmount
public void unmount()Description copied from class:ElementRemoves this Element from the tree.Called when the Element is no longer needed. Subclasses should perform cleanup work here and unmount their child Elements.
-
getChildren
Description copied from class:ElementGets the list of child Elements.- Overrides:
getChildrenin classElement- Returns:
- the child Element list, or an empty list if there are none
-
mountChildren
private void mountChildren()
-