Article View: borland.public.jbuilder.java.swing
Article #10409Re: TreeControl with Objects
From: Amazone
Date: Thu, 23 Sep 1999 00:00
Date: Thu, 23 Sep 1999 00:00
45 lines
1975 bytes
1975 bytes
You need to set a "TypedViewManager;" to the TreeControl, which will provide
a list of the different objects to be displayed in the tree, along with
their painter and editor.
TypedViewManager TreeEditViewManager = new TypedViewManager ();
...
TreeEditViewManager.add (
java.lang.Class.forName ("java.lang.String"), // The object
new SelectableTextItemPainter(), // The painter
null);
// The editor
TreeEditViewManager.add (
java.lang.Class.forName ("UtilSV3.ChampCompose"),
new ChampSimplePainter(),
new ChampComposeEditor());
...
setViewManager (TreeEditViewManager);
Then, you can specify what's to be shown in the tree....
Hope this helps, Pascale
Jan Peter wrote in message <7saups$nac1@forums.borland.com>...
>Hi,
>
>i want to build a TreeControl with Objects and in the TreeControl i want to
>show a string from the Object.
>Idea's ?
>
>Greetings from Flensburg
>
>Jan Peter Reeps
>Software-Entwicklung
>jpreeps@mittelstrass.de
>-----------------------------------------
>-------- Mittelstrass & Partner ---------
>web: http://www.mittelstrass.de
>mail: Gertrudenstr. 1, D 24939 Flensburg
>eMail: info@mittelstrass.de
>fon: +49 461 50370-0
>fax: +49 461 50370-70
>-----------------------------------------
>
>
>
Technical Details
Message-ID:
<yJpG3.5623$j6.68955@carnaval.risq.qc.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7saups$nac1@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,4d6ef2d4cf8b2c4c X-Google-Attributes: gid111d45,public From: "Amazone" <DeepCover@videotron.ca> Subject: Re: TreeControl with Objects Date: 1999/09/23 Message-ID: <yJpG3.5623$j6.68955@carnaval.risq.qc.ca> X-Deja-AN: 528631645 References: <7saups$nac1@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 X-Trace: carnaval.risq.qc.ca 938092510 132.208.210.61 (Thu, 23 Sep 1999 09:15:10 EDT) Organization: UQAM http://www.uqam.ca/ NNTP-Posting-Date: Thu, 23 Sep 1999 09:15:10 EDT Newsgroups: borland.public.jbuilder.java.swing