RE: Setting editor/renderer for JTreeTable
Im building a more graphical treetable. So I want to change the entire UI of the tree table. I would rather not deal with the minutae of replacing the entire renderer editor situation, but I don't see
a way around it. And the UI changes go beyond icons. For example, I do row gradiation from top to bottom in my tables, and I need to do the same in the treetable. Currently, the gradiatin is working
through custom renderers in the rest of the treetable, but needs to work in the tree part as well.
Does that give you some ideas? If not I can put up some screenshots or something.
From: firstname.lastname@example.org [mailto:email@example.com]
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.