After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 436674 - [lynn] flat-review only visits right-most tree nodes in SwingSet2 JTree demo
[lynn] flat-review only visits right-most tree nodes in SwingSet2 JTree demo
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: speech
2.17.x
Other Linux
: Normal normal
: 2.20.0
Assigned To: Lynn Monsanto
Orca Maintainers
Depends on:
Blocks: orca-java
 
 
Reported: 2007-05-07 19:09 UTC by Lynn Monsanto
Modified: 2008-07-22 19:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
proposed patch (2.30 KB, patch)
2007-05-11 21:31 UTC, Lynn Monsanto
none Details | Review

Description Lynn Monsanto 2007-05-07 19:09:14 UTC
1. Launch the SwingSet2 demo.

2. Launch the JTree demo and expand the tree so that tree nodes down to level 4 were visible (e.g., Music -> Classical -> Quartets -> ["Six String Quartets", "Three String Quartets", "Music"]). 

3. Use the up and down arrows to navigate the tree nodes. Orca speaks the tree nodes correctly.

3. Use flat-review to navigate the tree nodes. Flat-review only visits the right-most items ("Six String Quartets", "Three String Quartets", "Music") and skips all the other nodes.
Comment 1 Lynn Monsanto 2007-05-10 18:20:42 UTC
The problem appears to be caused by the MANAGES_DESCENDANTS state not being set for the SwingSet2 table. Unless there's a JDK 1.6 regression where the MANAGES_DESCENDANTS state is not set for JTables, the problem is possibly in the Java Access Bridge for GNOME.

[ debug.out ]
flat_review.getShowingZones (name= role=tree, state=ENABLED FOCUSABLE OPAQUE SENSITIVE SHOWING VISIBLE)

As an experiment, I modified flat_review.getShowingZones to call flat_review.getShowingDescendants if (root.role == rolenames.ROLE_TABLE). 


        if (root.state.count(atspi.Accessibility.STATE_MANAGES_DESCENDANTS) \
            and (root.childCount > 50) \
            or root.role == rolenames.ROLE_TREE:

            debug.println(debug.LEVEL_SEVERE, "calling getShowingDescendants")
            descendants = self.getShowingDescendants(root)
            debug.println(debug.LEVEL_SEVERE, "getShowingDescendants returned")
            for child in descendants:
                zones.extend(self.getShowingZones(child))

When I typed KP-8 in the SwingSet2 table demo, getShowingDescendants was called but didn't return. I didn't get any tracebacks.

It's possible the getShowingZones algorithm is not appropriate for Swing JTables.
Comment 2 Lynn Monsanto 2007-05-11 21:31:09 UTC
Created attachment 88043 [details] [review]
proposed patch
Comment 3 Willie Walker 2007-05-11 21:45:10 UTC
Lynn - this looks OK to me (thanks!).  The only thing I'm nervous about is that this touches a very sensitive area of the code and I'd hate for this to break something.  Can you try flat reviewing in various things, such as the table and tree demos in gtk-demo to see if this breaks anything there?

Comment 4 Lynn Monsanto 2007-05-23 18:12:02 UTC
I tested with gtk-demo and found no regressions. I'm going to close this as fixed as Will and I discussed yesterday.