Zimlet JavaScript API Reference - DwtTree

Class DwtTree


Extends DwtComposite.

This class implements a tree widget. Tree widgets may contain one or more DwtTreeItems.

Defined in: DwtTree.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtTree(params)
Creates a Tree widget.
Field Summary
Field Attributes Field Name and Description
<static>  
Defines the "checked-item" style.
<static>  
DwtTree.MULTI_STYLE
Defines the "multi" style.
<static>  
DwtTree.SINGLE_STYLE
Defines the "single" style.
Method Summary
Method Attributes Method Name and Description
 
Adds a selection listener.
 
Adds a separator.
 
addTreeListener(listener)
Adds a tree listener.
 
Clears the tree items.
 
De-selects all items.
 
Gets the tree item count.
 
Gets the items.
 
Get the nesting level; this is zero for trees.
 
Gets an array of selection items.
 
Gets the style.
 
getTreeItemList(visible)
Creates a flat list of this tree's items, going depth-first.
 
Removes a selection listener.
 
Removes a selection listener.
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, getData, 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, setVisible, setZIndex, showAlert, zShow
Class Detail
DwtTree(params)
Creates a Tree widget.
Author: Ross Dargahi.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} params.parent
the parent widget
{DwtTree.SINGLE_STYLE|DwtTree.MULTI_STYLE|DwtTree.CHECKEDITEM_STYLE} params.style
the tree style
{string} params.className
the CSS class
{constant} params.posStyle
the positioning style (see DwtControl)
{boolean} params.isCheckedByDefault
default checked state if tree styles is "checked"
Field Detail
<static> DwtTree.CHECKEDITEM_STYLE
Defines the "checked-item" style.

<static> DwtTree.MULTI_STYLE
Defines the "multi" style.

<static> DwtTree.SINGLE_STYLE
Defines the "single" style.
Method Detail
addSelectionListener(listener)
Adds a selection listener.
Parameters:
{AjxListener} listener
the listener

addSeparator()
Adds a separator.

addTreeListener(listener)
Adds a tree listener.
Parameters:
{AjxListener} listener
the listener

clearItems()
Clears the tree items.

deselectAll()
De-selects all items.

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

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

{number} getNestingLevel()
Get the nesting level; this is zero for trees.
Returns:
{number} the child item count

{array} getSelection()
Gets an array of selection items.
Returns:
{array} an array of DwtTreeItem objects

{constant} getStyle()
Gets the style.
Returns:
{constant} the style

{array} getTreeItemList(visible)
Creates a flat list of this tree's items, going depth-first.
Parameters:
{boolean} visible
if true, only include visible/selectable items
Returns:
{array} an array of DwtTreeItem objects

removeSelectionListener(listener)
Removes a selection listener.
Parameters:
{AjxListener} listener
the listener

removeTreeListener(listener)
Removes a selection listener.
Parameters:
{AjxListener} listener
the listener

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