Tree Template

From Documentation
Revision as of 07:34, 8 July 2022 by Hawk (talk | contribs) ((via JWB))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Similar to Listbox, you can also define a customer rendering with a template for a tree:

<tree model="${files}">
		<treecol label="Path"/>
		<treecol label="Description"/>
	<template name="model">
		<treeitem context="menupopup">
				<treecell label="${}"/>
				<treecell label="${}"/>

assume files is an instance of DefaultTreeModel. Notice since DefaultTreeModel is used, each references an instance of DefaultTreeNode. Thus, to retrieve the real data, use DefaultTreeNode.getData()

Version History

Version Date Content
6.0.0 July 2011 The template feature was introduced.

Last Update : 2022/07/08

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.