RE: Setting editor/renderer for JTreeTable
The JDNC demos have a more graphical approach to the tree in the treetable. There are no tree lines, and no visible structure. As an example, can you point me to where this code was implemented? It
wasn't readily apparent when I was looking though the source.
From: email@example.com [mailto:firstname.lastname@example.org]
Sent: Wednesday, July 28, 2004 4:34 PM
Subject: Re: Setting editor/renderer for JTreeTable
> I'm trying to switch my old JTreeTable code out for
> the new JDNC stuff. Im having trouble setting a new
> editor/renderer for the tree.
Do you have a custom tree cell renderer and editor with specialized needs? If so, we'd like to know.
The new treetable design treats the tree strictly as an implementation detail and does not leak a reference to that through the public api. This is to ensure that the internal state of the tree stays
in sync with the state of the treetable.
All of the work necessary to set up the renderer and editor for the hierarchical column is done internally by JTreeTable. Please see JTreeTable.setTreeTableModel for details on how this is done. The
idea is that users should not have to deal with these.
> Basically, I dont want the tree to look like a file
> explorerer -- I actually want it to look more like
> the demo for the JDNC XML stuff. (speaking of which,
> I dug through the src and didnt immediately see that
> code either).
> Any tips?
JTreeTable has dedicated methods for these. Please see setOpenIcon, setClosedIcon, setLeafIcon, setExpandedIcon, and setCollapsedIcon.
Hope this helps.
[Message sent by forum member 'rameshgupta' (Ramesh Gupta)]
If you are not an intended recipient of this e-mail, please notify
the sender, delete it and do not read, act upon, print, disclose,
copy, retain or redistribute it.
Click here for important additional terms relating to this e-mail.