Skip to main content

JTreeTable: How do I listen to the tree expansion events?

3 replies [Last post]
siva
Offline
Joined: 2003-07-15
Points: 0

I have a requirement where I have to explicitly track the
state of the tree nodes so that I can restore this state
later when needed. I don't see a way to do this at present.

Part of the reason why I need to separately maintain the
state is because, when I do changes to the tree structure,
for example, when a node is dragged and dropped under another node, I change the node's parent to the new parent
and issue the fireTreeNodesInserted/Removed commands and
the UI gets updated. However, the child is shown in collapsed state and it's earlier expansion paths are all lost. I am not sure if this is the JTree behavior itself or an implementation issue with JTreeTable.

Ramesh, most likely you are the one who is going to answer this and if so, a few more questions based on your response to my earlier questions.

1. I see the documentation and I use it as JTreeTable and
you keep referring to it as JXTreeTable. Is the name going to be changed in the future?

2. You mention changing the code, but I can only download the run-time. Where do I get to download the source code?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rameshgupta
Offline
Joined: 2004-06-04
Points: 0

> I have a requirement where I have to explicitly track the
> state of the tree nodes so that I can restore this state
> later when needed. I don't see a way to do this at present.

Please file an RFE at https://jdnc.dev.java.net/servlets/ProjectIssues :-)

>
> Ramesh, most likely you are the one who is going to
> answer this and if so, a few more questions based on
> your response to my earlier questions.
>
> 1. I see the documentation and I use it as JTreeTable
> and you keep referring to it as JXTreeTable. Is the name
> going to be changed in the future?

The name has already changed to JXTreeTable.
http://www.javadesktop.org/forums/thread.jspa?threadID=3511&messageID=18...

>
> 2. You mention changing the code, but I can only
> download the run-time. Where do I get to download the
> source code?

The entire source tree is available at https://jdnc.dev.java.net/source/browse/jdnc/

[off topic] Also, please don't forget to file an issue on the TreeModelEvent being thrown away when nodes are deleted from JXTreeTable. This is the one, for which I suggested that you change the code (I believe).

Ramesh

siva
Offline
Joined: 2003-07-15
Points: 0

Filed both issues. They are #58 and #62.

I just want to make sure before filing a bug/er that it is indeed the case. I hate when ppl file "NOT A BUG" bugs and I try to do the same by first confirming. Thanks.

gphilipp
Offline
Joined: 2003-06-10
Points: 0

Hi Siva,
I think now is a good time to file a RFE for your demands. I'm sure it will help the JDNC Team prioritize your enhancement requests and make sure it won't go overlooked because they 'forgot' to look at every single post in the forum.

Gilles Philippart