Skip to main content

JXTreeTable fixes in incubator

5 replies [Last post]
Joined: 2006-06-08

I have made an initial checkin into my incubator space of some JXTreeTable fixes (#218/219). /src/kschaefe/218/java contains an updated version of JXTreeTable, TreeTableModel, AbstractTreeTableModel, and DefaultTreeTableModel. In addition, I have added some missing documentation and updated some other documentation of these and some other tree table classes.

hierarchicalColumnClass and DefaultTreeTableModel.pathToRoot(TreeNode, int) have been deprecated.

I have a copy of the JXTreeTable unit tests in /src/kschaefe/218/test. The visual check provides the expected display (with some comments, below). I have added a "cycle tree column" button that demonstrates the ability to move the tree column after the table is created.

This checkin needs to have some additional unit testing, but I think demonstrates that the hierarchical column changes will do the task.

Here's some general problems/concerns/etc:
1. The ability to set the hierarchicalColumn is really nice, but is it really necessary?
2. When moving the hierarchicalColumn the values do not update (doesn't use getValueAt). This is already noted as bugs 339/481.

I'm now working on the unit tests and plans for 339/481. Any comments would be helpful.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-11

not sure if we want the setHierarchicalColumn. The major issue I see with it is that we don't have a suitable event to fire: the tree didn't change at all, so a structure change with all its far-reaching side-effects (loose selection, column related visual state, expansion ...) feels a bit hefty.

On the other hand, if there's enough pressure to add it .. any comments? Any use-cases where it's needed?


Joined: 2014-03-12

Complete newbie here responding to a seven-year-old thread; can't be good, I know.

I just wanted to say that I have a use-case for setting the hierarchical column in JXTreeTable: If I want the tree to be in the SECOND column and have checkboxes in the FIRST column. This way, the user can select / deselect rows for use in, say, a calculation.

Joined: 2006-06-08

After fooling with it for some time (ok a little over a week). I think the answer is no. An implementor could do this for any custom models, but I, too, came to the conclusion that there's nothing good to fire.

Since you're in agreement, it's gone.

Joined: 2006-06-08

I've added some unit tests for the models. There was a failing test for the editor, since I changed how that's working. Jeanette, need your advice here. Not sure that we need to bother testing that issue anymore...

I added more JavaDoc and corrected some JavaDoc errors.

Joined: 2003-07-08

> I'm now working on the unit tests and plans for
> 339/481. Any comments would be helpful.


Jeanette is more knowledgeable in this area of the code, so I'll defer to her comments.