Article View: borland.public.jbuilder.java.swing
Article #9840Re: jbcl.control.TreeControl
From: Paul Furbacher [TeamB]
Date: Fri, 07 Jan 2000 00:00
Date: Fri, 07 Jan 2000 00:00
32 lines
1656 bytes
1656 bytes
Hycel wrote: > Question: > > So, does any one no how I can find a node within a TreeControl and then make > it the selected node? > > Detail Information: [omitted] My guess is that you are working too hard by not using what is already available to you. The JBCL TreeControl and its associated classes are both elegant and powerful. They provide a great foundation for customizing. I'd suggest that you start deriving your custom tree model from "BasicTreeContainer". You will find a lot of useful methods in that class and the one it extendsf from, "LinkedTreeContainer". Add new methods only after you determine that you cannot use existing methods in these classes to achieve the desired results. In particular, searching is implemented in "LinkedTreeContainer". For the "moveUp" method, you can easily use existing "LinkedTreeNode" or "BasicTreeNode" methods if you create node objects based on either of these objects (highly suggested). Some very useful methods are "getChildren()", "getParent()", etc. Paul Furbacher (TeamB)
Technical Details
Message-ID:
<3876BFC7.272A0E6E@bilbo.bio.purdue.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<852590$q6i2@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,83ae6506ed959249 X-Google-Attributes: gid111d45,public From: "Paul Furbacher [TeamB]" <pf@bilbo.bio.purdue.edu> Subject: Re: jbcl.control.TreeControl Date: 2000/01/07 Message-ID: <3876BFC7.272A0E6E@bilbo.bio.purdue.edu> X-Deja-AN: 569855218 Content-Transfer-Encoding: 7bit References: <852590$q6i2@bornews.borland.com> Content-Type: text/plain; charset=us-ascii Organization: Reverse Alchemy, Inc. Mime-Version: 1.0 Reply-To: pf@bilbo.bio.purdue.edu Newsgroups: borland.public.jbuilder.java.swing