treenode.lzx
<library>
<include href="resources.lzx"/>
<include href="incubator/opttree/baseopttreenode.lzx"/>
<class name="treenode" extends="baseopttreenode">
<view resource="folder" frame="${ classroot.open ? 2 : 1 }"/>
<attribute name="mousein" value="false
"/>
<attribute name="bgcolor" value="${ mousein ? 0xCCCCEE : ( highlight ? 0xEECCCC : null ) }"/>
<text name="label" x="22" datapath="@name"/>
<handler name="onmouseover">
this.setAttribute( "mousein", true );
</handler>
<handler name="onmouseout">
this.setAttribute( "mousein", false );
</handler>
<method name="setSelected" args="s">
label.setAttribute( "fgcolor", s ? 0xFF0000 : 0x000000 );
</method>
<handler name="onclick">
parent.setOpen( datapath.p, !open );
parent.select( this );
</handler>
<handler name="onopen">
if ( !open ) return;
var p = datapath.p;
if ( !p ) return;
var cn = p.childNodes;
if ( !cn || !cn.length ){
gDataMan.loadAdditionalTreeData( p );
}
</handler>
</class>
</library>
Cross References
Includes
Classes
- <class name="treenode" extends="baseopttreenode">