|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.dom.css.CssBase
to.etc.domui.dom.html.NodeBase
to.etc.domui.dom.html.NodeContainer
public abstract class NodeContainer
Base node for tags that can contain other nodes.
A description on the deltaing mechanism used can be found in the header for NodeBase
NodeBase
Constructor Summary | |
---|---|
NodeContainer(java.lang.String tag)
Create a container with the specified tag name. |
Method Summary | ||
---|---|---|
void |
add(int index,
NodeBase nd)
Add the child at the specified index in the child list. |
|
void |
add(NodeBase nd)
Add the child at the end of the list. |
|
void |
add(java.lang.String txt)
Add a #text node. |
|
TBody |
addTable(java.lang.String... headers)
Utility method to add a table; it returns the TBody. |
|
protected void |
canContain(NodeBase node)
Override to check if special node types can be contained in this. |
|
protected void |
delegateTo(NodeContainer c)
|
|
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. |
|
|
getChildren(java.lang.Class<T> ofClass)
Locate all direct children of this container that are instancesof [ofClass]. |
|
|
getDeepChild(java.lang.Class<T> ofClass,
int instance)
Deprecated. |
|
|
getDeepChildren(java.lang.Class<T> ofClass)
Get a list of all children in the entire subtree that are an instance of the specified class. |
|
IErrorFence |
getErrorFence()
|
|
void |
internalCheckNotDirty()
Used for unit tests. |
|
void |
internalClearDelta()
DO NOT USE. |
|
void |
internalClearDeltaFully()
DO NOT USE. |
|
NodeBase[] |
internalGetOldChildren()
Internal: delta renderer old children set if this node changed. |
|
protected void |
internalShelve()
|
|
protected void |
internalUnshelve()
|
|
java.util.Iterator<NodeBase> |
iterator()
Return an iterator that iterates over all children, in order. |
|
void |
moveControlToModel()
EXPERIMENTAL - DO NOT USE. |
|
void |
moveModelToControl()
EXPERIMENTAL - DO NOT USE. |
|
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 |
setControlsEnabled(boolean on)
EXPERIMENTAL - DO NOT USE. |
|
void |
setErrorFence()
|
|
void |
setErrorFence(IErrorFence errorFence)
|
|
void |
setText(java.lang.String txt)
Set the text contained in this node, using tilde replacement. |
|
|
setValue(java.lang.Class<C> conv,
T value)
Put a converted value in this cell's text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NodeContainer(@Nonnull java.lang.String tag)
tag
- Method Detail |
---|
public final void internalCheckNotDirty()
public final void internalClearDelta()
internalClearDelta
in class NodeBase
NodeBase.internalClearDelta()
public final void internalClearDeltaFully()
internalClearDeltaFully
in class NodeBase
NodeBase.internalClearDeltaFully()
public final NodeBase[] internalGetOldChildren()
@Nonnull public final java.util.Iterator<NodeBase> iterator()
iterator
in interface java.lang.Iterable<NodeBase>
Iterable.iterator()
public final int getChildCount()
public final int findChildIndex(@Nonnull NodeBase b)
b
-
@Nonnull public final NodeBase getChild(int i)
i
-
@OverridingMethodsMustInvokeSuper protected void canContain(@Nonnull NodeBase node)
node
- public final void add(@Nonnull NodeBase nd)
nd
- public final void add(int index, @Nonnull NodeBase nd)
index
- nd
- public final void add(@Nullable java.lang.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 NodeBase
public void setText(@Nullable java.lang.String txt)
txt
- protected final void internalShelve() throws java.lang.Exception
internalShelve
in class NodeBase
java.lang.Exception
protected final void internalUnshelve() throws java.lang.Exception
internalUnshelve
in class NodeBase
java.lang.Exception
public TBody addTable(java.lang.String... headers)
cssclass
- When not null this is set as the css class for the TABLE tag.
public final <T> java.util.List<T> getChildren(@Nonnull java.lang.Class<T> ofClass)
T
- ofClass
-
public final <T> java.util.List<T> getDeepChildren(@Nonnull java.lang.Class<T> ofClass)
T
- ofClass
-
@Deprecated public final <T> T getDeepChild(@Nonnull java.lang.Class<T> ofClass, int instance)
T
- ofClass
- instance
-
public final void moveControlToModel() throws java.lang.Exception
moveControlToModel
in interface IModelBinding
moveControlToModel
in class NodeBase
java.lang.Exception
NodeBase.moveControlToModel()
public final void moveModelToControl() throws java.lang.Exception
moveModelToControl
in interface IModelBinding
moveModelToControl
in class NodeBase
java.lang.Exception
NodeBase.moveModelToControl()
public final void setControlsEnabled(boolean on)
setControlsEnabled
in interface IModelBinding
setControlsEnabled
in class NodeBase
NodeBase.setControlsEnabled(boolean)
protected void onRefresh() throws java.lang.Exception
onRefresh
in class NodeBase
java.lang.Exception
NodeBase.onRefresh()
protected final void delegateTo(@Nullable NodeContainer c)
public <T,C extends IConverter<T>> void setValue(@Nonnull java.lang.Class<C> conv, @Nullable T value) throws java.lang.Exception
T
- C
- conv
- value
-
java.lang.Exception
@Nullable public final IErrorFence getErrorFence()
public final void setErrorFence(@Nullable IErrorFence errorFence)
public final void setErrorFence()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |