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.
Summary: | OW refuses focus when empty (was: Activating a TopComponent does not move focus to its focus cycle) | ||
---|---|---|---|
Product: | platform | Reporter: | Marian Petras <mpetras> |
Component: | Output Window | Assignee: | _ tboudreau <tboudreau> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | Keywords: | FOCUS |
Priority: | P2 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 36840, 41766, 43195 |
Description
Marian Petras
2004-02-26 07:55:43 UTC
The bad thing is also that TopComponents do not provide an API for focus management (such as getFocusCycleRoot()). Nope, it does provide API, check tc.requestActive. TopComponent.requestActive() activates the TopComponent but it may not move focus to it - that's the bug. 1) TopComponent.requestActive() does everything it can AFAIK to give focus to the component. Please see ViewHierarchy.java, line 342 if you don't believe. 2) Scenario you mentioned works only if you have output window empty. AFAIK all other components works OK, problem isn't in winsys infrastructure, but in the fact that OW *refuses* focus when empty, that's the bug IMHO. If the output window is empty, there is no component that *should* be focusable. Where should focus go? I guess I could make the container focusable conditionally, if it is empty - but sending focus to non-focus-indicating things is generally a pretty bad idea. The problem here is that TopComponent.requestFocus() is overridden to be a no-op. So the output window doesn't contain any focusable components if it is empty, and it cannot set focus to itself. For more examples of bad behaviour, please look at the bugs that depend on this one. Since bug #43195 that depends on this one is P2, I raise priority of this bug to P2. Checking in src/org/netbeans/core/output2/Controller.java; /cvs/core/output2/src/org/netbeans/core/output2/Controller.java,v <-- Controll er.java new revision: 1.6; previous revision: 1.5 done Checking in src/org/netbeans/core/output2/OutputWindow.java; /cvs/core/output2/src/org/netbeans/core/output2/OutputWindow.java,v <-- Output Window.java new revision: 1.4; previous revision: 1.3 done Processing log script arguments... More commits to come... Checking in src/org/netbeans/core/output2/ui/AbstractOutputPane.java; /cvs/core/output2/src/org/netbeans/core/output2/ui/AbstractOutputPane.java,v <- - AbstractOutputPane.java new revision: 1.8; previous revision: 1.7 done Checking in src/org/netbeans/core/output2/ui/AbstractOutputWindow.java; /cvs/core/output2/src/org/netbeans/core/output2/ui/AbstractOutputWindow.java,v <-- AbstractOutputWindow.java new revision: 1.5; previous revision: 1.4 done Checking in src/org/netbeans/core/output2/ui/CloseButtonTabbedPane.java; /cvs/core/output2/src/org/netbeans/core/output2/ui/CloseButtonTabbedPane.java,v <-- CloseButtonTabbedPane.java new revision: 1.3; previous revision: 1.2 done Processing log script arguments... Mailing the commit message to cvs@core.netbeans.org (from tboudreau@netbeans.org ) verified in 4.2 dev |