Skip to main content

JTreeTable: Problem expanding/collapsing a node

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

Hi, when I expand a node, the focus goes into the node's value and then to be able to collapse the node, I have to first visit some other cell and then again click on the handle of the first node to collapse it. Same with expansion, I first have to go from the current node to another node and come back to do the operation.

However, if you see Window Explorer, the expansion/collapse operation is done in a small square with an x, and clicking on that repeatedly collapses and expands the node without taking focus to the node value (directory name). I think this is a much better user interface.

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

> Hi, when I expand a node, the focus goes into the
> node's value and then to be able to collapse the
> node, I have to first visit some other cell and then
> again click on the handle of the first node to
> collapse it. Same with expansion, I first have to go
> from the current node to another node and come back
> to do the operation.
>

Siva,

I just ran the unit test for JXTreeTable, and I don't see this problem. Sorry!

> However, if you see Window Explorer, the
> expansion/collapse operation is done in a small
> square with an x, and clicking on that repeatedly
> collapses and expands the node without taking focus
> to the node value (directory name). I think this is a
> much better user interface.

As far as I can tell, JXTreeTable behaves the same way -- Clicking the little toggle switch repeatedly will toggle back and forth between expand and collapse. No need to go from the current node to another node and come back!

Ramesh

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

Not sure why I am having so many UI issues. I was using JDK 1.4.0_01. I just moved to 1.4.2_05 and the issue still persists. I am running this on Windows 2000. I tried both the crossplatform l&f and windows l&f and they both have the same issue I mentioned above.

rameshgupta
Offline
Joined: 2004-06-04
Points: 0

> Not sure why I am having so many UI issues. I was
> using JDK 1.4.0_01. I just moved to 1.4.2_05 and the
> issue still persists. I am running this on Windows
> 2000. I tried both the crossplatform l&f and windows
> l&f and they both have the same issue I mentioned above.

I am using 1.4.2_05 on Windows XP Professional, but I don't see this behavior. Could somebody who has Windows 2000 please try to run the JTreeTableUnitTest using 1.4.2, and either confirm or deny this? Thanks a bunch!

Ramesh

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

Ramesh, I think I found a way to reproduce both this issue and the other issue I talked in another thread about all nodes being highlighted after reaching the end of the table.

To observe these issues, you have to have the row selection enabled. With row selection turned off, they work fine.

rameshgupta
Offline
Joined: 2004-06-04
Points: 0

> Ramesh, I think I found a way to reproduce both this
> issue and the other issue I talked in another thread
> about all nodes being highlighted after reaching the
> end of the table.
>
> To observe these issues, you have to have the row
> selection enabled. With row selection turned off,
> they work fine.

Sorry, I tried everything, including treeTable.setRowSelectionAllowed(true), but I still cannot reproduce this under 1.4.2/XP Pro :-( Now, the most promising lead can come from someone other than you who has seen this behavior on Windows 2000. Is there anyone else who could help us verify the alleged bug? Please!

Ramesh