This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Seems to have been broken by proppanel rewrite. Now I can see focus clearly in the Options TTV, which is good, but Tab still moves between rows in the TTV (stopping also in the "<<" column) and Ctrl-Tab (which used to switch you into the property sheet) does nothing. So I don't think the Options dialog is now KB-accessible.
Hmm, the table will now let you tab through all of its rows and columns. If you're at 0,0 or last,last and press tab, it asks the FocusTraversalPolicy of its first focus cycle root ancestor for its sibling component, and sends focus there. I tested that pretty thoroughly. So the problem has more to do with the focus transfer policy of the Options dialog - somehow it's sending focus back to the treetable, rather than to the property sheet.
OK, several things here. 1. Tabbing to the last item in the Options dialog is not an acceptable way to put focus into the property sheet. You would be changing the properties as you moved to new rows; and it would take a lot of work. (Besides being ridiculous, the last item is Templates, which has no properties, so it couldn't possibly work.) 2. Tabbing from the last item in Options in fact sends you to the Close button; then it goes to Help, then back to the TTV. You never enter the property sheet at all. This is presumably a bug in the Options dialog, but who knows. 3. Ctrl-Tab *used* to work (before your merge) to send focus from the TTV directly to the property sheet. This is the normal usage of Ctrl-Tab: to immediately exit from a complex component and go to the next focus owner. Now, Ctrl-Tab does nothing at all. This is a regression, in TTV I think.
I'll see what I can do to make CTRL-Tab do what it did before. Tabbing between cells in the tree table will not change properties. Edit mode is not entered unless you press space, same as the property sheet (in which tab now also works correctly, BTW). Hmm, spent an hour on it and found out the following: - If I comment out all my strange focus and tab key tricks, CTRL-Tab still does nothing. Why? Container con = TreeTable.this.getFocusCycleRootAncestor(); Component to = con.getFocusTraversalPolicy().getComponentAfter(con, TreeTable.this); if (to == TreeTable.this) { System.err.println("Ugh."); } will print "Ugh" every time. AFAIK the problem is more or less LayoutFocusTraversalPolicy, a JDK traversal policy that tries to do a rough estimate based on the x,y coordinates of components for order. CTRL-Shift-Tab, on the other hand, works. You can back your way to the property sheet (if my focus stuff is commented out)...
Okay, I've got a stunningly ugly fix. The source of the problem is that TreeTable calls setFocusCycleRoot(true). You *have* to do this in a JTable if you want to have a prayer of getting focus back when an editor is removed (otherwise it will be set to a random component somewhere in the same window [no, it doesn't seem to matter what is next/before in the focus transfer policy]). Anyway, it now works as well as anything in TTV does...
(also included slightly unrelated killing of a JScrollPane subclass whose only purpose was to not allow a child table to set its border - that bit of evil is in JTable.configureEnclosingScrollPane, which I've overridden as a cleaner solution). cvs commit: Examining . Checking in TreeTable.java; /cvs/openide/src/org/openide/explorer/view/TreeTable.java,v <-- TreeTable.java new revision: 1.34; previous revision: 1.33 done Checking in TreeTableView.java; /cvs/openide/src/org/openide/explorer/view/TreeTableView.java,v <-- TreeTableV iew.java new revision: 1.53; previous revision: 1.52 done Processing log script arguments... Mailing the commit message to cvs@openide.netbeans.org (from tboudreau@netbeans. org)
closed