惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
罗磊的独立博客
F
Fortinet All Blogs
T
Threatpost
Y
Y Combinator Blog
博客园_首页
美团技术团队
Security Latest
Security Latest
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
V
V2EX - 技术
The Cloudflare Blog
L
LINUX DO - 热门话题
博客园 - 司徒正美
Jina AI
Jina AI
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
The Hacker News
The Hacker News
P
Privacy International News Feed
T
The Exploit Database - CXSecurity.com
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Latest news
Latest news
NISL@THU
NISL@THU
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
雷峰网
雷峰网
Application and Cybersecurity Blog
Application and Cybersecurity Blog
B
Blog RSS Feed
W
WeLiveSecurity
D
DataBreaches.Net
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
Know Your Adversary
Know Your Adversary
TaoSecurity Blog
TaoSecurity Blog
S
Securelist
Help Net Security
Help Net Security

博客园 - IT战神

[评论]为什么程序员的社会地位不高?--转载 转载--解决PowerDesigner 反向工程没有列注释(SQLSERVER 2005版) , 获取相对路径 (c#) 数据库优化(转载) Linq to Entities实例 asp.net开源项目及学习资料 C#.net同步异步SOCKET通讯和多线程总结 winform的ftp方式上传 - IT战神 - 博客园 ms agent 精灵 带右键菜单c# c#面实题及答案 哲理人生 - IT战神 - 博客园 创业 史玉柱经典语录(转) jsp 面试题 regsvr32 注册大全 DotNet控件开发的资料列表(共享) ie6 和ie7版本带来的一个奇怪的中文乱码问题(长度为奇数时最后一个字符会出现乱码)(原创) uml 图解 jsp cookie 中文乱码 的解决方法
xtree,不错的javascript树
IT战神 · 2008-11-14 · via 博客园 - IT战神
 

WebFXTreeAbstractNode

Abstract object with common functions and methods shared by WebFXTree and WebFXTreeItem. The two of those inherites from this object.

Constructor

Abstract object - no instances of it should be created

Properties

Name Type Description
id Number Read only property that can be used to find the related HTMLElement. It can also be used the other way around. If you know the id of the HTMLElement you can get the JS object by looking in the webFXTreeHandler.all collection.
text String The text label for the node.
action String The action (uri) associated with the node.
open Boolean Read only. Boolean property that tells if the node is expanded or collapsed (will always return false if there are no child nodes).
icon String Image file to use as icon. Uses default if not specified.
openIcon String Image file to use as the open icon (if child nodes only). Uses default if not specified.
parentNode Reference A reference to the parent node.
childNodes Array Collection of references to all child nodes.

Methods

Name Returns Description
add(oNode, [bNoIdent]) Reference Adds a tree item to the current item. This method takes two argument, the first is the WebFXTreeItem object to add and the second is an optional boolean value, that if specified and set to true will prevent the tree from executing the indent method automatically once the node has been added. This parameter has no effect on calls to the add method before the tree is rendered, but settings this flag when adding nodes after the tree has been rendered will greatly reduce the time needed to complete the operation, this can be quite useful while adding more than one node at a time, but requires that the indent method is manually executed on the top most node affected by the changes afterwards. Returns a reference to the added node.
indent() Void Redraws the traces between nodes and makes sure the tree is properly layed out.
toggle() Void Toggles the expand/collapse.
expand() Void Expands the tree item.
collapse() Void Collapses the tree item.
expandAll() Void Expands the tree item and all sub items recursively.
collapseAll() Void Collapses the tree root and all sub items recursively.
expandChildren() Void Expands all sub items recursively (same as executing expandAll and the collapse).
collapseChildren() Void Collapses all sub items recursively (same as executing collapseAll and the expand).
getNextSibling() Reference Returns a reference to the next sibling.
getPreviousSibling() Reference Returns a reference to the previous sibling.
toString() String Genereates the HTML string needed to render the tree item.

WebFXTree

The WebFXTree object is used to create the actual tree root that can later be populated with tree items. All properties and methods from the WebFXTreeAbstractNode are inherited.

Constructor

new WebFXTree([text], [action], [behavior])
Name Type Description
text String Optional. The text label for the tree root.
action String Optional. The action (uri) associated with the tree root.
behavior String Optional. Name of the behavior to use, check the setBehavior() method for details.
icon String Optional. Image to use as the icon.
openIcon String Optional. Image to use as the open icon.

Properties

Name Type Description
rendered Boolean Flag that indicates whatever or no the tree has been generated and rendered.

Methods

Name Returns Description
getSelected() Reference Returns the id of the selected object, if any.
setBehavior(sBehavior) Void Has to be specified before the tree is created and can be used to change the way the tree behaves, possible values are classic (default) and explorer. Check the usage page for more information about this.
getBehavior() String Returns the name of the behavior used.

WebFXTreeItem

Used to create tree items, can be added (uisng the add method) to a WebFXTree or to another WebFXTreeItem object. All properties and methods from the WebFXTreeAbstractNode are inherited.

Constructor

new WebFXTreeItem([text], [action], [parent], [icon], [openIcon])
Name Type Description
text String Optional. The text label for the tree item.
action String Optional. The action (uri) associated with the tree item.
parent Reference Optional. Reference to an object to witch the node should be added.
icon String Optional. Image to use as the icon.
openIcon String Optional. Image to use as the open icon.

Properties

Name Type Description
None but the inherited ones

Methods

Name Returns Description
getFirst() Reference Returns a reference to the first child node, if any.
getLast() Reference Returns a reference to the last child node, if any.

History & Introduction
Usage
API

下载代码地址

/Files/wuzk2008/xtree/xtree117.zipImplementation
Demo
Download