Bug 209051 - TopComponent.getSubComponents()
TopComponent.getSubComponents()
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Window System
7.2
All All
: P2 (vote)
: 7.2
Assigned To: Stanislav Aubrecht
issues@platform
: API, API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-01 14:33 UTC by Stanislav Aubrecht
Modified: 2012-03-08 11:03 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
proposed API changes (4.84 KB, patch)
2012-03-01 14:38 UTC, Stanislav Aubrecht
Details | Diff
API implementation in core.multiview (3.68 KB, patch)
2012-03-02 10:36 UTC, Stanislav Aubrecht
Details | Diff
proposed API changes (5.03 KB, patch)
2012-03-02 10:44 UTC, Stanislav Aubrecht
Details | Diff
proposed API changes (5.49 KB, patch)
2012-03-05 11:02 UTC, Stanislav Aubrecht
Details | Diff
API implementation in core.multiview (2.68 KB, patch)
2012-03-05 11:03 UTC, Stanislav Aubrecht
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Aubrecht 2012-03-01 14:33:46 UTC
The window system needs access to individual tabs in a multi-view window. (The primary use case is the new Ctrl+Tab popup switcher requested by JDev team).
Comment 1 Stanislav Aubrecht 2012-03-01 14:38:10 UTC
Created attachment 116247 [details]
proposed API changes
Comment 2 Stanislav Aubrecht 2012-03-01 14:39:17 UTC
The new API can be also used to implement access to e.g. Output window sub-tabs or to switch views in Navigator window...
Comment 3 Jesse Glick 2012-03-01 19:14:19 UTC
[JG01] Would want to see at least one impl, say in core.multiview, and at least one caller, say the popup switcher.


[JG02] The default impl is documented to return null but it is unclear what this means and whether subclasses can do the same. Would prefer to return an empty array unless there is a specialized meaning for null.


[JG03] The lifecycle and threading behavior of SubComponent is unclear. Hold long may the caller hold on to these objects? What happens if a new tab appears? Or a tab that has already been returned is closed? Or a different tab is selected so that the 'active' fields in two tabs are now wrong? Must all calls to getSubComponents, and calls to SubComponent methods, be on EQ?


[JG04] Constructors for abstract classes should be marked protected as a stylistic matter.
Comment 4 Stanislav Aubrecht 2012-03-02 10:36:37 UTC
Created attachment 116284 [details]
API implementation in core.multiview
Comment 5 Stanislav Aubrecht 2012-03-02 10:44:41 UTC
Created attachment 116285 [details]
proposed API changes
Comment 6 Stanislav Aubrecht 2012-03-02 10:47:50 UTC
JG01: i've added core.multiview implementation. the new popup switcher is still work in progress so i can't provide a working patch. but the idea is to allow Ctrl+Tab switching to individual sub-tabs in multiview windows (and also possibly to e.g. Output window's sub-tabs), see UI specification here: 
http://aseng-wiki.us.oracle.com/asengwiki/pages/viewpage.action?pageId=-1890418465

JG02: i've changed that, see the new patch

JG03: i've clarified the javadoc

JG04: fixed, see the new patch
Comment 7 Jaroslav Tulach 2012-03-02 13:05:08 UTC
Y01 I was hoping this API will be more hidden. tc.getClientProperty("subComponents").

Y02 Make SubComponent final. Pass in an ActionListener instead of overriding activate method.
Comment 8 Stanislav Aubrecht 2012-03-05 11:02:47 UTC
Created attachment 116345 [details]
proposed API changes
Comment 9 Stanislav Aubrecht 2012-03-05 11:03:14 UTC
Created attachment 116346 [details]
API implementation in core.multiview
Comment 10 Stanislav Aubrecht 2012-03-05 11:04:18 UTC
Y01: client property makes API implementation and API usage very awkward

Y02: i've changed the API, see the new patch
Comment 11 Stanislav Aubrecht 2012-03-06 09:28:29 UTC
i'll integrate the changes tomorrow
Comment 12 Stanislav Aubrecht 2012-03-07 09:57:31 UTC
core-main 058c610fdcbe
Comment 13 Quality Engineering 2012-03-08 11:03:40 UTC
Integrated into 'main-golden', will be available in build *201203080400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/058c610fdcbe
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #209051 - TopComponent.getSubComponents()


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo