|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sgx.j2s.js.NativeWrapper org.sgx.j2s.yui3.yui.YUINativeWrapper org.sgx.j2s.yui3.yui.event.EventTarget org.sgx.j2s.yui3.yui.Attribute org.sgx.j2s.yui3.yui.Base org.sgx.j2s.yui3.yui.widget.Widget org.sgx.j2s.aui.tree.TreeData
public class TreeData
A base class for TreeData, providing: Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor) Handle the data of the tree Basic DOM implementation (append/remove/insert) Indexing management to handle the children nodes Note: in AUI, TreeData extends Base not widget. Then in AUI, a TreeView is not a Widget...
Field Summary |
---|
Fields inherited from class org.sgx.j2s.yui3.yui.YUINativeWrapper |
---|
Y |
Fields inherited from class org.sgx.j2s.js.NativeWrapper |
---|
_data, _EMPTYPARAMS |
Constructor Summary | |
---|---|
TreeData()
|
Method Summary | |
---|---|
void |
appendChild(TreeNode node,
boolean cancelBubbling)
Append a child node to the TreeData. |
void |
bubbleEvent(java.lang.String eventType,
java.lang.Object[] args,
boolean cancelBubbling,
boolean stopActionPropagation)
Bubble event to all parent nodes. |
void |
collapseAll()
Collapse all children of the TreeData. |
TreeNode |
createNode(java.lang.Object options)
Create a TreeNode instance. |
void |
eachChildren(java.lang.Runnable callback,
boolean recursive)
Loop each children and execute the fn callback. |
void |
eachParent(java.lang.Runnable callback)
Loop each parent node and execute the fn callback. |
void |
empty()
Delete all children of the current TreeData. |
void |
expandAll()
expand all children of the TreeData. |
TreeNode[] |
getChildren(boolean deep)
Get an Array of the children nodes of the current TreeData. |
java.lang.Object |
getEventOutputMap(TreeNode node)
Get an object containing metadata for the custom events. |
TreeNode |
getNodeByChild(Node child)
Get a TreeNode instance by a child DOM Node. |
TreeNode |
getNodeById(java.lang.String id)
Get a TreeNode by id. |
boolean |
hasChildNodes()
Whether the TreeData contains children or not. |
int |
indexOf(int index)
Index of the passed TreeNode on the children attribute. |
void |
insert(TreeNode treeNode,
TreeNode refTreeNode,
java.lang.String where)
Insert treeNode before or after the refTreeNode . |
void |
insertAfter(TreeNode treeNode,
TreeNode refTreeNode)
Insert treeNode after the refTreeNode . |
void |
insertBefore(TreeNode treeNode,
TreeNode refTreeNode)
Insert treeNode before the refTreeNode . |
boolean |
isRegistered(TreeNode node)
Whether the TreeNode is registered on this TreeData. |
TreeNode |
item(int index)
Get a TreeNode children by index. |
void |
refreshIndex()
Refresh the index (i.e. re-index all nodes). |
void |
registerNode(TreeNode node)
Register the passed TreeNode on this TreeData. |
void |
removeChild(TreeNode node)
Remove the passed node from the current TreeData. |
void |
selectAll()
Select all children of the TreeData. |
void |
unregisterNode(TreeNode node)
Unregister the passed TreeNode from this TreeData. |
void |
unselectAll()
Unselect all children of the TreeData. |
void |
updateIndex(java.lang.Object index)
Update the index attribute value. |
void |
updateReferences(TreeNode node,
TreeNode parentNode,
TreeView ownerTree)
Update the references of the passed TreeNode. |
Methods inherited from class org.sgx.j2s.yui3.yui.widget.Widget |
---|
blur, disable, enable, focus, getByNode, getClassName, getDefaultLocale, getSkinName, getString, getStrings, hide, render, show |
Methods inherited from class org.sgx.j2s.yui3.yui.Attribute |
---|
addAttr, addAttrs, attrAdded, get, getAttrs, modifyAttr, removeAttr, reset, set, setAttrs |
Methods inherited from class org.sgx.j2s.yui3.yui.event.EventTarget |
---|
after, before, detach, detachAll, fire, getEvent, on, once, publish |
Methods inherited from class org.sgx.j2s.yui3.yui.YUINativeWrapper |
---|
_load |
Methods inherited from class org.sgx.j2s.js.NativeWrapper |
---|
_call, _get, _getData, create |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeData()
Method Detail |
---|
public TreeNode getNodeById(java.lang.String id)
{String}
- uid
public boolean isRegistered(TreeNode node)
{TreeNode}
- node
public void updateReferences(TreeNode node, TreeNode parentNode, TreeView ownerTree)
{node}
- TreeNode{parentNode}
- TreeNode{ownerTree}
- TreeViewpublic void refreshIndex()
public void registerNode(TreeNode node)
{TreeNode}
- nodepublic void updateIndex(java.lang.Object index)
{Object}
- indexpublic void unregisterNode(TreeNode node)
{TreeNode}
- nodepublic void collapseAll()
public void expandAll()
public void selectAll()
public void unselectAll()
public void eachChildren(java.lang.Runnable callback, boolean recursive)
fn
callback.
{function}
- fn callback{boolean}
- fn recursivepublic void eachParent(java.lang.Runnable callback)
fn
callback.
{function}
- fn callbackpublic void bubbleEvent(java.lang.String eventType, java.lang.Object[] args, boolean cancelBubbling, boolean stopActionPropagation)
{String}
- eventType{Array}
- args{boolean}
- cancelBubbling{boolean}
- stopActionPropagationpublic TreeNode createNode(java.lang.Object options)
{Object}
- options
public void appendChild(TreeNode node, boolean cancelBubbling)
{TreeNode}
- node{boolean}
- cancelBubblingpublic TreeNode item(int index)
{Number}
- index
public int indexOf(int index)
{TreeNode}
- node
public boolean hasChildNodes()
public TreeNode[] getChildren(boolean deep)
public java.lang.Object getEventOutputMap(TreeNode node)
public void removeChild(TreeNode node)
node
from the current TreeData.
public void empty()
public void insert(TreeNode treeNode, TreeNode refTreeNode, java.lang.String where)
treeNode
before or after the refTreeNode
.
treeNode
- refTreeNode
- where
- 'before' or 'after'public void insertAfter(TreeNode treeNode, TreeNode refTreeNode)
treeNode
after the refTreeNode
.
{TreeNode}
- treeNode{TreeNode}
- refTreeNodepublic void insertBefore(TreeNode treeNode, TreeNode refTreeNode)
treeNode
before the refTreeNode
.
{TreeNode}
- treeNode{TreeNode}
- refTreeNodepublic TreeNode getNodeByChild(Node child)
{Node}
- child
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |