public abstract class NodeContainer extends NodeBase implements Iterable<NodeBase>
| Constructor and Description |
|---|
NodeContainer(String tag)
Create a container with the specified tag name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
NodeBase nd)
Add the child at the specified index in the child list.
|
NodeContainer |
add(NodeBase nd)
Add the child at the end of the list.
|
NodeContainer |
add(String txt)
Add a #text node.
|
TBody |
addTable(String... headers)
Utility method to add a table; it returns the TBody.
|
TBody |
addTableForLayout() |
TBody |
addTableForLayout(String css) |
void |
appendTreeErrors(List<UIMessage> errorList) |
protected void |
canContain(NodeBase node)
Override to check if special node types can be contained in this.
|
protected void |
createFrame()
EXPERIMENTAL This can be overridden to handle nodes that have an explicit "frame".
|
void |
delegateTo(NodeContainer c)
EXPERIMENTAL Set delegation to another node.
|
void |
disableAllChildControlsDeep()
Finds all IControl and IActionControl children and set it to readonly/disabled.
|
int |
findChildIndex(NodeBase b)
Return the index of the specified child, if present.
|
void |
forceRebuild()
This destroys all existing nodes and causes this node to be rebuilt the next time the
tree is rendered.
|
NodeBase |
getChild(int i)
Get the nth child.
|
int |
getChildCount()
Return the #of children of this container.
|
<T> List<T> |
getChildren(Class<T> ofClass)
Locate all direct children of this container that are instancesof [ofClass].
|
<T> List<T> |
getDeepChildren(Class<T> ofClass)
Get a list of all children in the entire subtree that are an instance of the specified class.
|
NodeContainer |
getDelegate()
If this node delegates it's stuff to another, this returns that other node.
|
IErrorFence |
getErrorFence() |
String |
getTextContents()
If this node contains
TextNode's only this creates the text string represented by those nodes. |
boolean |
hasError()
Return T if this node currently has an error associated with it.
|
protected void |
internalAdd(int index,
NodeBase nd) |
void |
internalCheckNotDirty()
Used for unit tests.
|
void |
internalClearDelta()
DO NOT USE.
|
void |
internalClearDeltaFully()
DO NOT USE.
|
protected void |
internalCreateFrame()
This method is a placeholder for NodeContainer which allows it to handle
framed windows somehow.
|
protected int |
internalGetNodeCount(int depth)
Count the #of nodes in this tree, recursively until the given depth.
|
NodeBase[] |
internalGetOldChildren()
Internal: delta renderer old children set if this node changed.
|
void |
internalOnBeforeRender() |
protected void |
internalShelve() |
protected void |
internalUnshelve() |
Iterator<NodeBase> |
iterator()
Return an iterator that iterates over all children, in order.
|
protected void |
onRefresh()
Default onRefresh for a container will call refresh on all children.
|
void |
removeAllChildren()
Discard all children.
|
NodeBase |
removeChild(int index)
Remove the nth child.
|
void |
removeChild(NodeBase child)
Remove a child node from me.
|
void |
replaceChild(NodeBase child,
NodeBase nw)
Swap two children: the "child" (1st) parameter gets removed, and the "nw" (2nd) parameter
is put in it's place, at it's position.
|
void |
setErrorFence() |
void |
setErrorFence(IErrorFence errorFence) |
void |
setText(String txt)
Set the text contained in this node, using tilde replacement.
|
<T,C extends IConverter<T>> |
setValue(Class<C> conv,
T value)
Put a converted value in this cell's text.
|
void |
undelegatedAdd(int index,
NodeBase nd) |
NodeBase |
undelegatedGetChild(int i) |
$, acceptRequestParameter, addBinding, addCssClass, addGlobalMessage, addNotificationListener, afterCreateContent, alignToLeft, alignToLeft, alignToMiddle, alignToMiddle, alignTopToBottom, alignTopToBottom, alignToRight, alignToRight, alignToTop, alignToTop, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, appendJQuerySelector, appendJsCustomUpdatesContributor, appendShowOverflowTextAsTitleJs, appendStatement, beforeCreateContent, bind, bind, bindErrors, build, calcTestID, changed, changedJavascriptState, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, clearValidationFailure, componentHandleWebAction, componentHandleWebDataRequest, createContent, createStatement, findComponentBundle, findParent, getActualID, getAllocationTracepoint, getBindingErrors, getBindingList, getBrowserWindowSize, getCalculatedTestID, getClicked, getClientBounds, getComponentBundle, getComponentDataURL, getComponentDataURL, getComponentInfo, getComponentJSONURL, getCreateJS, getCssClass, getErrorList, getErrorLocation, getFocusID, getMessage, getOnClickJS, getOnMouseDownJS, getOnSizeAndPositionChange, getPage, getParent, getParent, getParent, getParentOfTypes, getSharedContext, getSharedContextFactory, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTestRepeatId, getThemedResourceRURL, getTitle, getUserObject, handleDrop, hasCssClass, hasParent, internalGetOldParent, internalGetParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalOnValueChanged, internalRenderJavascriptDelta, internalRenderJavascriptState, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetLogAllocations, internalSetTag, isAttached, isBuilt, isFocusable, isFocusRequested, isRendersOwnClose, isStretchHeight, lc, notify, notifyParentOrOpenerPage, onAddedToPage, onBeforeFullRender, onBeforeRender, onForceRebuild, onHeaderContributors, onRemoveFromPage, onShelve, onUnshelve, refresh, remove, removeBinding, removeCssClass, renderJavascriptDelta, renderJavascriptState, renderJavascriptState, replaceWith, setBrowserWindowSize, setCalculcatedId, setCalculcatedId, setClicked, setClientBounds, setComponentBundle, setCssClass, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setOnSizeAndPositionChange, setOverrideTitle, setSpecialAttribute, setStretchHeight, setTestID, setTestRepeatID, setTitle, setUserObject, toString, visitgetBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic final void internalCheckNotDirty()
public final void internalClearDelta()
internalClearDelta in class NodeBaseNodeBase.internalClearDelta()public final void internalClearDeltaFully()
internalClearDeltaFully in class NodeBaseNodeBase.internalClearDeltaFully()public final NodeBase[] internalGetOldChildren()
protected int internalGetNodeCount(int depth)
internalGetNodeCount in class NodeBaseNodeBase.internalGetNodeCount(int)@Nonnull public final Iterator<NodeBase> iterator()
iterator in interface Iterable<NodeBase>Iterable.iterator()public final int getChildCount()
public final int findChildIndex(@Nonnull NodeBase b)
b - public final NodeBase undelegatedGetChild(int i)
@OverridingMethodsMustInvokeSuper protected void canContain(@Nonnull NodeBase node)
node - @Nonnull public final NodeContainer add(@Nonnull NodeBase nd)
nd - public final void add(int index,
@Nonnull
NodeBase nd)
index - nd - @Nonnull public final NodeContainer add(@Nullable String txt)
txt - public final void removeChild(@Nonnull NodeBase child)
child - @Nonnull public final NodeBase removeChild(int index)
index - public final void replaceChild(@Nonnull NodeBase child, @Nonnull NodeBase nw)
child - nw - public final void removeAllChildren()
@OverridingMethodsMustInvokeSuper public final void forceRebuild()
forceRebuild in class NodeBasepublic void setText(@Nullable String txt)
TextNode being added.
FIXME This must be renamed and made final.txt - @Nullable public String getTextContents()
TextNode's only this creates the text string represented by those nodes. If
other nodes are found this returns null.protected final void internalShelve()
throws Exception
internalShelve in class NodeBaseExceptionprotected final void internalUnshelve()
throws Exception
internalUnshelve in class NodeBaseExceptionpublic TBody addTable(String... headers)
headers - When not null this is set as the css class for the TABLE tag.public final <T> List<T> getChildren(@Nonnull Class<T> ofClass)
T - ofClass - @Nonnull public final <T> List<T> getDeepChildren(@Nonnull Class<T> ofClass)
T - ofClass - protected void onRefresh()
throws Exception
onRefresh in class NodeBaseExceptionNodeBase.onRefresh()public <T,C extends IConverter<T>> void setValue(@Nonnull Class<C> conv, @Nullable T value) throws Exception
T - C - conv - value - Exception@Nullable public final IErrorFence getErrorFence()
public final void setErrorFence(@Nullable IErrorFence errorFence)
public final void setErrorFence()
public final void internalOnBeforeRender()
throws Exception
internalOnBeforeRender in class NodeBaseExceptionpublic final void delegateTo(@Nullable NodeContainer c)
c - public NodeContainer getDelegate()
delegateTo(NodeContainer) for
details.protected final void internalCreateFrame()
throws Exception
NodeBaseinternalCreateFrame in class NodeBaseException@OverridingMethodsMustInvokeSuper protected void createFrame() throws Exception
Exceptionpublic void appendTreeErrors(@Nonnull List<UIMessage> errorList)
appendTreeErrors in class NodeBasepublic boolean hasError()
NodeBaseCopyright © 2017 etc.to. All rights reserved.