[nbdev] Re: Old problem with JTabbedPane in TopComponent

  • From: Peter Blemel < >
  • To: NetBeans Mailing list < >
  • Subject: [nbdev] Re: Old problem with JTabbedPane in TopComponent
  • Date: Wed, 13 Mar 2013 09:10:04 -0600
  • Importance: Normal

Hermann,

I am not sure why you'd want to defer creating your root nodes, but you can set the root context at any time (you just can't change it afterwards).  You might, for example, catch the changes between tabs and create the root node the first time that a tab is selected.

Peter


Date: Wed, 13 Mar 2013 10:58:32 +0100
From:
To:
Subject: [nbdev] Re: Old problem with JTabbedPane in TopComponent

Hello Peter,
thanks a lot, it works. Only one problem is left: How do I postpone the node creation for tabs until they get selected? A TopComponent can contain 10 tabs which the user not neccessarily uses in one session.

Hermann

Am 13.03.2013 05:27, schrieb Peter Blemel:
">
Hermann,

Off the top of my head, as I recall each of your JPanels (tabs) needs to implement ExplorerManager.Provider and have it's own ExplorerManager.  Each also needs to implement it's own Lookup (I.e.  lookup = ExplorerUtils.createLookup(tabExplorerManager, getActionMap()); )

In your TopComponent create an array of references to each tab's lookup, and use a ProxyLookup to aggregate the tab's lookups (I.e.  tcPanelLookup = new ProxyLookup (new Lookup[] {panel1.lookup, panel2.lookup}); )

Apologies for any syntax errors.  If my memory serves, when a tab becomes active it's explorer manager automatically updates it's lookup so you don't have to do anything else.
 
Regards,
Peter




Date: Wed, 13 Mar 2013 04:58:13 +0100
From: ">
To: ">
Subject: [nbdev] Old problem with JTabbedPane in TopComponent

Hello everybody,
I know that my problem is already discussed multiple times but I don't find the solution on the web.

I have a Rich Client Application with multiple TopComponents. Each TopComponent contains at least a JTabbedPane which displays a custom OutlineView on every tab.
A TopComponent has a Controller and a OutlineView has a PageController which implement the program logic. The content of an OutlineView shall be populated after
seleting its tab using a database query.

My goal is that the properties window displays the details of the selected object in the OutlineView of the active JTabbedPane tab in the selected TopComponent.

Can someone tell me how to implement that?
  • Do I need multiple ExplorerMangers for one TopComponent ? If so, shall I implement them within the OutlineView or within the PageController?
  • Do I need multiple Lookups?
  • Where and how do I create the Lookups?
Is there a tutorial available for a TopComponent with multiple OutlineViews?

Thanks a lot in advance.

Hermann




[nbdev] Old problem with JTabbedPane in TopComponent

Hermann Matthes 03/13/2013

[nbdev] Re: Old problem with JTabbedPane in TopComponent

Peter Blemel 03/13/2013

[nbdev] Re: Old problem with JTabbedPane in TopComponent

Hermann Matthes 03/13/2013

[nbdev] Re: Old problem with JTabbedPane in TopComponent

Peter Blemel 03/13/2013

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close