Java Doc for AsyncTreeNode.java in  » Ajax » gwtext-2.01 » com » gwtext » client » widgets » tree » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » gwtext 2.01 » com.gwtext.client.widgets.tree 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.gwtext.client.widgets.tree.TreeNode
   com.gwtext.client.widgets.tree.AsyncTreeNode

AsyncTreeNode
public class AsyncTreeNode extends TreeNode (Code)
Provides the abilty to asynchronously lazy load a TreeNodes children. An AsyncTreeNode is assigned a TreeLoader which is reponsible for fetching the tree data and loading it into the tree as children. The TreeLoader can be configured to load tree data from remote Json data and com.gwtext.client.widgets.tree.XMLTreeLoader can be use to load tree data from XML returned from a remote URL.

Sample code for loading a Tree node using AsyncTreeNode and XmltreeLoader :

 
 final TreePanel treePanel = new TreePanel("cb-tree", new TreePanelConfig() {
 {
 setAnimate(true);
 setEnableDD(true);
 setContainerScroll(true);
 setRootVisible(true);
 }
 });
 final XMLTreeLoader loader = new XMLTreeLoader(new XMLTreeLoaderConfig() {
 {
 setDataUrl("countries-cb.xml");
 setMethod("get");
 setRootTag("countries");
 setFolderIdMapping("@id");
 setLeafIdMapping("@id");
 setFolderTitleMapping("@title");
 setFolderTag("team");
 setLeafTitleMapping("@title");
 setLeafTag("country");
 setQtipMapping("@qtip");
 setDisabledMapping("@disabled");
 setCheckedMapping("@checked");
 setIconMapping("@icon");
 setAttributeMappings(new String[]{"@rank"});
 }
 });
 AsyncTreeNode root = new AsyncTreeNode("Countries", new AsyncTreeNodeConfig() {
 {
 setLoader(loader);
 }
 });
 treePanel.setRootNode(root);
 treePanel.render();
 root.expand();
 treePanel.expandAll();
 
 
The above code loads a Tree using the following XML data - countries-cb.xml
 
 <countries>
 <team id="team-a" title="Team A" icon="images/silk/flag_yellow.gif" checked="true">
 <country title="Brazil" qtip="Rank 2" rank="2"  checked="false"/>
 <country title="Canada" qtip="Rank 3" rank="3" checked="false"/>
 <country title="China" qtip="Rank 4" rank="4" checked="false"/>
 </team>
 <team title="Team B" icon="images/silk/flag_blue.gif">
 <country title="Germany" qtip="Captain" checked="true" rank="1"/>
 <country title="France" qtip="Rank 2" rank="2" checked="false"/>
 <country title="Canada" qtip="Rank 3" rank="3" checked="false"/>
 <country title="India" qtip="Rank 4" rank="4" checked="false"/>
 <country title="Seychelles" qtip="Rank 5" rank="5" checked="false"/>
 </team>
 <team title="Team C" icon="images/silk/flag_green.gif">
 <country title="United States" qtip="Captain - Rank 1" checked="true" rank="1"/>
 <country title="Japan" qtip="Rank 2" rank="2" checked="false"/>
 <country title="Italy" qtip="Rank 3" rank="3" checked="false"/>
 <country title="Finland" qtip="Rank 4" rank="4" checked="false"/>
 </team>
 </countries>
 
 

See Also:   TreeLoader
See Also:   com.gwtext.client.widgets.tree.XMLTreeLoader



Constructor Summary
public  AsyncTreeNode(TreeLoader treeLoader)
    
public  AsyncTreeNode(String text, TreeLoader treeLoader)
    
public  AsyncTreeNode(String text, TreeLoader treeLoader, boolean expanded)
    

Method Summary
native public  voidaddListener(AsyncTreeNodeListener listener)
     Adds an AsyncTreeNode Listener.
native protected  JavaScriptObjectcreate(JavaScriptObject config)
    
native public  TreeLoadergetLoader()
     Return the TreeLoader associated with this node.
native public  booleanisLoaded()
     Returns true if this node has been loaded.
native public  booleanisLoading()
     Returns true if this node is currently loading.
native public  voidreload()
     Trigger a reload for this node.
native public  voidreload(Function callback)
     Trigger a reload for this node.
public  voidsetLoader(TreeLoader loader)
    


Constructor Detail
AsyncTreeNode
public AsyncTreeNode(TreeLoader treeLoader)(Code)
Construct a new AsyncTreeNode
Parameters:
  treeLoader - the tree loader



AsyncTreeNode
public AsyncTreeNode(String text, TreeLoader treeLoader)(Code)
Construct a new AsyncTreeNode
Parameters:
  treeLoader - the tree loader
Parameters:
  text - the node label / display text



AsyncTreeNode
public AsyncTreeNode(String text, TreeLoader treeLoader, boolean expanded)(Code)
Construct a new AsyncTreeNode
Parameters:
  treeLoader - the tree loader
Parameters:
  text - the node label / display text
Parameters:
  expanded - true to expand




Method Detail
addListener
native public void addListener(AsyncTreeNodeListener listener)(Code)
Adds an AsyncTreeNode Listener.
Parameters:
  listener - the listener



create
native protected JavaScriptObject create(JavaScriptObject config)(Code)



getLoader
native public TreeLoader getLoader()(Code)
Return the TreeLoader associated with this node. the tree loader



isLoaded
native public boolean isLoaded()(Code)
Returns true if this node has been loaded. true if node loaded



isLoading
native public boolean isLoading()(Code)
Returns true if this node is currently loading. true if node loading



reload
native public void reload()(Code)
Trigger a reload for this node.



reload
native public void reload(Function callback)(Code)
Trigger a reload for this node.
Parameters:
  callback - the callback to execute when the reload is complete



setLoader
public void setLoader(TreeLoader loader)(Code)



Methods inherited from com.gwtext.client.widgets.tree.TreeNode
native public void addListener(TreeNodeListener listener)(Code)(Java Doc)
native public TreeNode cloneNode()(Code)(Java Doc)
native public TreeNode cloneNode(TreeNode config)(Code)(Java Doc)
native public void collapse()(Code)(Java Doc)
native public void collapse(boolean deep, boolean anim)(Code)(Java Doc)
native public void collapseChildNodes(boolean deep)(Code)(Java Doc)
native protected JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc)
protected Node createNode(JavaScriptObject jsNode)(Code)(Java Doc)
native public void disable()(Code)(Java Doc)
native public void enable()(Code)(Java Doc)
native public void ensureVisible()(Code)(Java Doc)
native public void expand()(Code)(Java Doc)
native public void expand(boolean deep, boolean anim)(Code)(Java Doc)
native public void expand(boolean deep, boolean anim, Function callback)(Code)(Java Doc)
native public void expandChildNodes(boolean deep)(Code)(Java Doc)
public String getIconCls()(Code)(Java Doc)
native public String getText()(Code)(Java Doc)
native public TreeNodeUI getUI()(Code)(Java Doc)
public static Node instance(JavaScriptObject jsObj)(Code)(Java Doc)
native public boolean isDisabled()(Code)(Java Doc)
native public boolean isExpanded()(Code)(Java Doc)
native public boolean isSelected()(Code)(Java Doc)
public void select()(Code)(Java Doc)
public void setAllowDrag(boolean allowDrag)(Code)(Java Doc)
public void setAllowDrop(boolean allowDrop)(Code)(Java Doc)
public void setChecked(boolean checked)(Code)(Java Doc)
public void setCls(String cls)(Code)(Java Doc)
public void setDisabled(boolean disabled)(Code)(Java Doc)
public void setExpanded(boolean expanded)(Code)(Java Doc)
public void setHref(String href)(Code)(Java Doc)
public void setHrefTarget(String hrefTarget)(Code)(Java Doc)
public void setIcon(String icon)(Code)(Java Doc)
public void setIconCls(String iconCls)(Code)(Java Doc)
public void setLeaf(Node leaf)(Code)(Java Doc)
public void setSingleClickExpand(boolean singleClickExpand)(Code)(Java Doc)
public void setText(String text)(Code)(Java Doc)
public void setTooltip(String qtip)(Code)(Java Doc)
public void setTooltip(QuickTipsConfig qtipConfig)(Code)(Java Doc)
native public void toggle()(Code)(Java Doc)
native public void unselect()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.