RE: JTreeTable not responding to tree events
Ill buy that.
From: firstname.lastname@example.org [mailto:email@example.com]
Sent: Friday, August 13, 2004 2:13 PM
Subject: Re: JTreeTable not responding to tree events
> Hi, thanks for the response. That really helped. I
> had in my code for the isCellEditable, something
> if(column == 0) return false;
> Why is the editable functionality overloaded with
> tree events? I mean, my requirement is to have a tree
> whose nodes can't be edited. However, I should be
> able to perform actions on them like expand, collapse
> and select. For example, I can't edit the label of a
> button, but I can click it. Right? So, why should the
> cell be editable for it to expand or collapse? If
> that's a limitation I can't overcome, then is there a
> way to disable the editing of the node name?
Please see the related thread http://www.javadesktop.org/forums/thread.jspa?messageID=22345#22345 for some background on this. This is also filed as JDNC issue #49
Basically, JXTreeTable uses a tree internally to manage and render the nodes in the hierarchical column. While the tree itself is not editable, the treetable must allow editing in the hierarchical
column in order for mouse clicks to be properly processed.
Now, there are two types of editing that we are talking about:
(1) modifying the expanded/collapsed state of a node, and
(2) modifying the node content/label
In issue 49, I suggested adding a method to explicitly distinguish between the two types of editing. But on closer examination, it seems like there is no need to change the api, just the semantics --
So, nodes should be expanded/collapsed regardless of the return value of isCellEditable(), and the node content/label should be editable iff isCellEditable() returns true.
[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.