Title: Message
I'm trying to customize a JTree to display a Branch.  I've created a class almost identical to the DocumentTreeModel, but it takes a Branch rather than a Document (see code attached).  It works fine.  Now, I'm trying to create a tree renderer to display leaf nodes with my own icons.  However, it seems that the tree model is being built entirely of BranchTreeNodes, without any LeafTreeNodes at the leaves.  Here's the XML (not xsl) that I'm bullding the tree from:
 
<?xml version="1.0"?>
<code>
<choose>
    <when test="XPath"> <transform/></when>
    <when test="XPath"> <address/></when>
    <when test="XPath"> </when>
    <when test="XPath"> </when>
    <otherwise><transform transformed-doc-name="fool.xml" transformed-doc-type="foo"/> </otherwise>
</choose>
<transform/>
<address/>
<route/>
</code>
Any idea why no LeafTreeNodes are created?
 
Attached is a screenshot of the JTree, and the BranchTreeModel.java file.

<<attachment: JTree.jpg>>

Attachment: BranchTreeModel.java
Description: Binary data

Reply via email to