And to answer the question why children() returns an Iterator and not an Enumeration: well, I prefer Iterator because of it's interface which I know from other languages. There is no deeper reason than that. If you like I'm just following the Enumeration javadoc: ' New implementations should consider using Iterator in preference to Enumeration.' :-)
Oliver
Heath Borders wrote:
I'm in favor of using the Swing TreeNode interface. I'd really like to see this whole thing implemented exactly like the swing JTree with the models they have.
On Sun, 30 Jan 2005 12:08:54 -0500, Sean Schofield
<[EMAIL PROTECTED]> wrote:
One revision to my suggestion would be to not have a separate interface for branch vs. regular node. We can probably use the existing MyFaces TreeNode interface which has an isLeaf method. It turns out this is how its done in the Swing version of TreeNode so we should probably conform to that.
One question for Oliver would be why the children() method returns an Interrator instead of Enumeration as in the Swing version? Other than this method the TreeNode interface seems to match the Swing version.
Also, would it be appropriate to just use the javax.swing.tree.TreeNode interface? If the interfaces are identical maybe we could just use the one in the java API. Its a little odd perhaps but I can't really think of a good reason not to do so.
sean
-- Oliver Rossmueller Software Engineer and IT-Consultant Hamburg, Germany http://www.rossmueller.com

