Main Page | Packages | Class Tree | Index | Help

xp.controls

class TreePanel

MovieClip
  |
  +--xp.system.UIControl
        |
        +--xp.controls.Container
              |
              +--xp.controls.ItemPanel
                    |
                    +--xp.controls.TreePanel


class TreePanel
extends ItemPanel

A row in a heirarchical tree structure.

Conceptually a TreePanel has three separate interfaces.
One is a typical row object in an ItemsControl that lays out a child components in a horizontal row, and updates itself to reflect selected or highlighted states.
The second is a node in a heirarchical tree structure of other nodes(rows), the root of the tree is the parent ItemsControl.
The third is an xml node this row is associated with which can be accessed via its data property.

Child cells are the objects that visually make up this row and are part of the containers children array.
Child nodes are other rows that are children under the heirarchical tree and are part of this rows treeItems array.
Child nodes are not accesible through the children array as they are not true children of this row, they are actually siblings in the parent ItemsControl.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public static
classInfo: Object
A static class information object

public
iconPath
Path to the node or attribute or field containing the linkageId of the icon

public
itemIndent: Number
The item indent per level in pixels

public
labelPath
Path to the node or attribute or field containing the display label text

public
parentItem: Object
The parent node(row) in the hierarchichal tree

public
styleClass: String
The name of the style class this instance will use.

public
treeItems: Array
The child nodes(rows) in the hierarchical tree

Fields inherited from class xp.controls.ItemPanel

classInfo, indent, itemStyle, label, styleClass

Fields inherited from class xp.controls.Container

__showStatusBar, __showTitleBar, acceptButton, cancelButton, children, classInfo, controlBar, controls, dataSource, enableBGMouseEvents, initialFocusControl, isRoot, lastFocus, layoutDescriptor, layoutId, layoutManager, rootContainer, styleClass, symbolId, tabList, tabModeWrap

Fields inherited from class xp.system.UIControl

__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment

Property Summary

public
icon (read, write)
The library symbol of the icon set to load

public
indent: Number (read-only)
This rows indent value

public
isBranch: Boolean (read, write)
Is this a branch.

public
isOpen: Boolean (read, write)
Is this node open or closed

public
level: Number (read, write)
Gets or sets the level attribute of a node

Properties inherited from class xp.controls.ItemPanel

itemIndex

Properties inherited from class xp.controls.Container

childCount, footerHeight, headerHeight, innerBackground, innerBackgroundVisible, innerBorderBrush, innerBorderRadius, innerBorderStyle, innerBorderThickness, numChildren, showStatusBar, showTitleBar, status, title

Properties inherited from class xp.system.UIControl

alpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y

Constructor

public
TreePanel ( )
Constructor - This should not be called directly.


Method Summary

public
destroy ( ): Void
Destroys or remove the component from the stage

public
getClass ( ): Function
Returns a reference to the components static class

public
getNodeIndex ( ): Number
returns the index of a display node in its parent children list

Methods inherited from class xp.controls.ItemPanel

getClass

Methods inherited from class xp.controls.Container

addChild, addChildren, addControlBar, clearAll, createChild, destroyChildAt, getChild, getChildAt, getChildFromMouse, getClass, getFooterHeight, getHeaderHeight, getNextControl, getUIBuilder, getViewMetrics, initLayoutManager, onChildFocus, processEnterKey, processEscapeKey, registerChild, selectNextControl, setDataContext, setFocus, setMeasuredMinSize, setMeasuredSize, unregisterChild

Methods inherited from class xp.system.UIControl

addBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate



Field Documentation

classInfo

public static var classInfo: Object
A static class information object

Every class has an associated classInfo object that holds the version and other static information. The classInfo can be accessed either directly by referencing the static class or by calling getClass() on any class instance.

iconPath

public var iconPath
Path to the node or attribute or field containing the linkageId of the icon

itemIndent

public var itemIndent: Number
The item indent per level in pixels

labelPath

public var labelPath
Path to the node or attribute or field containing the display label text

parentItem

public var parentItem: Object
The parent node(row) in the hierarchichal tree

styleClass

public var styleClass: String
The name of the style class this instance will use.

treeItems

public var treeItems: Array
The child nodes(rows) in the hierarchical tree


Property Documentation

icon

public icon (read, write)
The library symbol of the icon set to load

The icon property is the symbol of library clip. Setting this property causes the item to be loaded.

indent

public indent: Number (read-only)
This rows indent value

Calculates the indent using level and itemIndent properties.

isBranch

public isBranch: Boolean (read, write)
Is this a branch.

True if this is a branch node false if it is a leaf. Note: a node may be defined as a branch even if it has no child nodes.

isOpen

public isOpen: Boolean (read, write)
Is this node open or closed

level

public level: Number (read, write)
Gets or sets the level attribute of a node

Also adjust the level of its child nodes as appropriate


Constructor Documentation

TreePanel

public function TreePanel()
Constructor - This should not be called directly.

Tree Panel are usually instantiated by a TreeItemsControl


Method Documentation

destroy

public function destroy(): Void
Destroys or remove the component from the stage

Destroy the control and all its child nodes

Overrides:

getClass

public function getClass(): Function
Returns a reference to the components static class

Overrides:

getNodeIndex

public function getNodeIndex(): Number
returns the index of a display node in its parent children list


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc