Zimlet JavaScript API Reference - DwtTreeItem

Class DwtTreeItem


Extends DwtComposite.

This class implements a tree item widget.

Defined in: DwtTreeItem.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtTreeItem(params)
Creates a Tree Item.
Method Summary
Method Attributes Method Name and Description
 
addSeparator(index)
Adds a separator at the given index.
 
Enables (or disables) the selection.
 
Checks if the item is checked.
 
getData(key)
override DwtControl.prototype.getData to take care of special case of KEY_OBJECT of type ZmOrganizer.
 
Gets the image.
 
Gets the child item count.
 
Gets the items.
 
Get the nesting level; the toplevel tree is zero, and each lower layer increases by one.
 
Gets the text.
 
setChecked(checked, force)
Sets the checked flag.
 
setDndText(text)
Sets the drag-and-drop text.
 
setExpanded(expanded, recurse, skipNotify)
Expands or collapses this tree item.
 
setImage(imageInfo)
Sets the image.
 
setText(text)
Sets the text.
 
setTreeItemColor(className)
Sets the tree item color.
 
setVisible(visible, itemOnly, childOnly)
Makes this tree item, or just part of it, visible or hidden.
 
Shows (or hides) the check box.
 
Shows (or hides) the expansion icon.
Methods borrowed from class DwtComposite:
addChild, cleanupSeparators, clear, dispose, getChild, getChildren, getNumChildren, getTabGroupMember, removeChild, removeChildren
Methods borrowed from class DwtControl:
addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, focus, getBounds, getClassName, getContent, getCursor, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setZIndex, showAlert, zShow
Class Detail
DwtTreeItem(params)
Creates a Tree Item.
Author: Ross Dargahi.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} params.parent
the parent widget
{number} params.index
the index at which to add this control among parent's children
{string} params.text
the label text for the tree item
{string} params.imageInfo
the icon for the left end of the tree item
{string} params.extraInfo
the icon for the right end of the tree item
{string} params.expandNodeImage
the icon to use for expanding tree item (instead of default)
{string} params.collapseNodeImage
the icon to use for collapsing tree item (instead of default)
{string} params.className
the CSS class
{constant} params.posStyle
the positioning style (see DwtControl)
{boolean} params.deferred
if true, postpone initialization until needed.
{boolean} params.selectable
if true, this item is selectable
{boolean} params.forceNotifySelection
force notify selection even if checked style
{boolean} params.forceNotifyAction
force notify action even if checked style
{boolean} params.singleClickAction
if true, an action is performed in single click
{AjxCallback} params.dndScrollCallback
the callback triggered when scrolling of a drop area for an object being dragged
{string} params.dndScrollId
the id
{boolean} params.arrowDisabled
{boolean} params.dynamicWidth
if true, the table should be width auto instead of the default fixed
Method Detail
addSeparator(index)
Adds a separator at the given index. If no index is provided, adds it at the end. A separator cannot currently be added as the first item (the child DIV will not have been created).
Parameters:
{number} index
the position at which to add the separator

enableSelection(enable)
Enables (or disables) the selection.
Parameters:
{boolean} enable
if true, enable selection

{boolean} getChecked()
Checks if the item is checked.
Returns:
{boolean} true if the item is checked

{*} getData(key)
override DwtControl.prototype.getData to take care of special case of KEY_OBJECT of type ZmOrganizer. See bug 82027
Parameters:
key
Returns:
{*}

{string} getImage()
Gets the image.
Returns:
{string} the image

{number} getItemCount()
Gets the child item count.
Returns:
{number} the child item count

{array} getItems()
Gets the items.
Returns:
{array} an array of child DwtTreeItem objects

{number} getNestingLevel()
Get the nesting level; the toplevel tree is zero, and each lower layer increases by one.
Returns:
{number} the child item count

{string} getText()
Gets the text.
Returns:
{string} the text

setChecked(checked, force)
Sets the checked flag.
Parameters:
{boolean} checked
if true, check the item
{boolean} force
if true, force the setting

setDndText(text)
Sets the drag-and-drop text.
Parameters:
{string} text
the text

setExpanded(expanded, recurse, skipNotify)
Expands or collapses this tree item.
Parameters:
{boolean} expanded
if true, expands this node; otherwise collapses it
{boolean} recurse
if true, expand children recursively (does not apply to collapsing)
{boolean} skipNotify
if true, do not notify the listeners

setImage(imageInfo)
Sets the image.
Parameters:
{string} imageInfo
the image

setText(text)
Sets the text.
Parameters:
{string} text
the text

setTreeItemColor(className)
Sets the tree item color.
Parameters:
{string} className
the class name

setVisible(visible, itemOnly, childOnly)
Makes this tree item, or just part of it, visible or hidden.
Parameters:
{boolean} visible
if true, item (or part of it) becomes visible
{boolean} itemOnly
if true, apply to this item's DIV only; child items are unaffected
{boolean} childOnly
if true, apply to this item's child items only

showCheckBox(show)
Shows (or hides) the check box.
Parameters:
{boolean} show
if true, show the check box

showExpansionIcon(show)
Shows (or hides) the expansion icon.
Parameters:
{boolean} show
if true, show the expansion icon

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:30 GMT-0400 (EDT)