Zimlet JavaScript API Reference - ZmTreeView

Class ZmTreeView


Extends DwtTree.

This class displays data in a tree structure.

Defined in: ZmTreeView.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ZmTreeView(params)
Creates an empty tree view.
Method Summary
Method Attributes Method Name and Description
 
Gets the tree view's header node.
 
Gets the data (an organizer) from the tree item nearest the one associated with the given ID.
 
Gets the currently selected organizer(s).
<static>  
ZmTreeView.getSortIndex(node, organizer, sortFunction)
Finds the correct position for an organizer within a node, given a sort function.
 
Gets the tree item that represents the organizer with the given ID.
 
set(params)
Populates the tree view with the given data and displays it.
 
setSelected(organizer, skipNotify, noFocus)
Selects the tree item for the given organizer.
 
Returns a string representation of the object.
Methods borrowed from class DwtTree:
addSelectionListener, addSeparator, addTreeListener, clearItems, deselectAll, getItemCount, getItems, getNestingLevel, getSelection, getStyle, getTreeItemList, removeSelectionListener, removeTreeListener
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
ZmTreeView(params)
Creates an empty tree view.
Author: Conrad Damon.
Parameters:
{Hash} params
the hash of parameters
{DwtControl} params.parent
the tree's parent widget
{constant} params.type
the organizer type
{String} params.className
the CSS class
{constant} params.posStyle
the positioning style
{constant} params.overviewId
theoverview ID
{String} params.headerClass
the CSS class for header item
{DwtDragSource} params.dragSrc
the drag source
{DwtDropTarget} params.dropTgt
the drop target
{constant} params.treeStyle
tree style (see DwtTree)
{Boolean} params.isCheckedByDefault
sets the default state of "checked" tree style
{Hash} params.allowedTypes
a hash of org types this tree may display
{Hash} params.allowedSubTypes
a hash of org types this tree may display below top level
{boolean} params.actionSupported
(default to value from Overview if not passed)
Method Detail
{DwtHeaderTreeItem} getHeaderItem()
Gets the tree view's header node.
Returns:
{DwtHeaderTreeItem} the item

{Object} getNextData(id)
Gets the data (an organizer) from the tree item nearest the one associated with the given ID.
Parameters:
{int} id
an organizer ID
Returns:
{Object} the data or null for none

{Array|DwtTreeItem} getSelected()
Gets the currently selected organizer(s). If tree view is checkbox style, return value is an {Array} otherwise, a single {DwtTreeItem} object is returned.
Returns:
{Array|DwtTreeItem} the selected item(s)

<static> {int} ZmTreeView.getSortIndex(node, organizer, sortFunction)
Finds the correct position for an organizer within a node, given a sort function.
Parameters:
{DwtTreeItem} node
the node under which organizer is to be added
{ZmOrganizer} organizer
the organizer
{function} sortFunction
the function for comparing two organizers
Returns:
{int} the index

{DwtTreeItem} getTreeItemById(id)
Gets the tree item that represents the organizer with the given ID.
Parameters:
{int} id
an organizer ID
Returns:
{DwtTreeItem} the item

set(params)
Populates the tree view with the given data and displays it.
Parameters:
{Hash} params
a hash of parameters
{ZmTree} params.dataTree
data in tree form
{Boolean} params.showUnread
if true, show unread counts
{Hash} params.omit
a hash of organizer IDs to ignore
{Hash} params.include
a hash of organizer IDs to include
{Boolean} params.omitParents
if true, do NOT insert parent nodes as needed
{Hash} params.searchTypes
the types of saved searches to show
{Boolean} params.noTooltips
if true, don't show tooltips for tree items
{Boolean} params.collapsed
if true, initially leave the root collapsed
{Hash} params.optButton
a hash of data for showing a options button in the item: image, tooltip, callback

setSelected(organizer, skipNotify, noFocus)
Selects the tree item for the given organizer.
Parameters:
{ZmOrganizer} organizer
the organizer to select, or its ID
{Boolean} skipNotify
if true, skip notifications
{Boolean} noFocus
if true, select item but don't set focus to it

{String} toString()
Returns a string representation of the object.
Returns:
{String} a string representation of the object

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