Extends: Object
Implements: Options, Events
An item in a tree. An item is a leaf node that has no children.
Jx.TreeItem supports selection via the click event. The application is responsible for changing the style of the selected item in the tree and for tracking selection if that is important.
Example
Events
| click | triggered when the tree item is clicked |
Implements
| Events | MooTools Class.Extras |
| Options | MooTools Class.Extras |
License
Copyright © 2008, DM Solutions Group Inc.
This file is licensed under an MIT style license
Summary
| Jx.TreeItem | Extends: Object |
| Properties | |
| domObj | {HTMLElement} a reference to the HTML element that is the TreeItem in the DOM |
| owner | {Object} the folder or tree that this item belongs to |
| Options | |
| label | {String} the label to display for the TreeItem |
| data | {Object} any arbitrary data to be associated with the TreeItem |
| contextMenu | {<Jx.ContextMenu>} the context menu to trigger if there is a right click on the node |
| enabled | {Boolean} the initial state of the TreeItem. |
| image | {String} URL to an image to use as the icon next to the label of this TreeItem |
| imageClass | {String} CSS class to apply to the image, useful for using CSS sprites |
| Constructor | |
| Jx.TreeItem | Create a new instance of Jx.TreeItem with the associated options |
| Functions | |
| finalize | Clean up the TreeItem and remove all DOM references |
| finalizeItem | Clean up the TreeItem and remove all DOM references |
| clone | Create a clone of the TreeItem |
| update | Update the CSS of the TreeItem’s DOM element in case it has changed position |
| selected | Called when the DOM element for the TreeItem is clicked, the node is selected. |
| getName | Get the label associated with a TreeItem |
| propertyChanged | A property of an object has changed, synchronize the state of the TreeItem with the state of the object |