Treerow

Treerow is a single row in the tree, it is the main content of treeitem. Treerow can contains multiple treecell, each treecell represent one column in this row by sequencial. A treecell can contains any component in it, such as label, image, textbox etc.

<window title="tree demo" border="normal" width="400px">
    <tree id="tree" width="90%" >    
        <treecols sizable="true">        
            <treecol label="Name"/>            
            <treecol label="Description"/>            
        </treecols>        
        <treechildren>        
            <treeitem>            
                <treerow>                
                    <treecell>                    
                        <image src="/img/folder.gif"/>Item 1                        
                    </treecell>                    
                    <treecell>                    
                        <textbox value="Item 1 description"/>                        
                    </treecell>                    
                </treerow>                
            </treeitem>            
            <treeitem>            
                <treerow>                
                    <treecell label="Item 2"/>                    
                    <treecell label="Item 2 description"/>                    
                </treerow>                
                <treechildren>                
                    <treeitem open="false">                    
                        <treerow>                        
                            <treecell label="Item 2.1">                            
                                <image src="/img/folder.gif"/>                                
                            </treecell>                            
                        </treerow>                        
                        <treechildren>                        
                            <treeitem>                            
                                <treerow>                                
                                    <treecell label="Item 2.1.1"/>                                    
                                </treerow>                                
                            </treeitem>                            
                        </treechildren>                        
                    </treeitem>                    
                </treechildren>                
            </treeitem>            
            <treeitem label="Item 3"/>            
        </treechildren>        
    </tree>    
</window>

Class Name

org.zkoss.zul.Treerow

Supported Child Components

Treecell

Supported Events

*None

Properties

Property

Description

Data Type

Default Value

context

Don't use this property of Treerow, use Treeitem.context instead.

String

Always throws UnsupportedOperationException

popup

Don't use this property of Treerow, use Treeitem.popup instead.

String

Always throws UnsupportedOperationException

tooltip

Don't use this property of Treerow, use Treeitem.tooltip instead.

String

Always throws UnsupportedOperationException

Methods

Name

Description

Data Type

Values

getLevel

Returns the level this cell is.

int

getLinkedTreechildren

Returns the Treechildren associated with this Treerow.

Treechildren

getSclass

Returns the style class. Note: 1) if not set (or setSclass(null), "item" is assumed; 2) if selected, it appends " seld" to super's getSclass().

String

getTree

Returns the Tree instance containing this element.

Tree

Inherited From