Somchai, do you need the Vector returned by getChildren to be "live", i.e. modifying the Vector modifies the state of the ObjectNode? I suppose that this is not the case and would return a clone of the Vector in the getChildren() implementation.
Regards, Peter > -----Original Message----- > From: SomchaiDion [mailto:[EMAIL PROTECTED] > Sent: Monday, June 09, 2003 21:07 > To: [EMAIL PROTECTED] > Subject: Vector of children in ObjectNode > > > Dear sir, > I just changed to develop application with Slide 1.0.16 > to 2.0 (from > cvs). I found that there are many changes. However, for my first times > sending email to developer mailing list, I would like to ask about the > ObjectNode class. If this topic should be sent to user > mailing list, please > execute me. > I tried to map Slide structure to a TreeNode for showing > on JTree. But, > there are 2 methods for get enumeration of children, getChildren() and > enumerateChildren(). I had a problem that the JTree/TreeModel > index a child > node by number. That do not sure the order of children in > enumeration will > be the same all times. The old way that I did is to put all > children in > enumeration into Vector and sort. It is not effective. In the > Slide 1.0.16, > I can obtain the ObjectNode.children by writing a utility > class in the same > package because it has a default modifier. So sad, in version > 2.0, it is a > private. > Because of there are 2 methods doing the same. Is it > possible to change > the getChildren() to return Vector? > > Thank you > Somchai > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
