NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
tomwheeler
Joined: 03 Sep 2008 Posts: 950
|
Posted: Wed Mar 24, 2010 5:58 pm Post subject: [platform-dev] Re: Reset currentSelected Node after a update of keys |
|
|
I have always been confused by the differences (if there are any)
between selected nodes, activated nodes and current nodes. The
javadoc doesn't provide much clue that I've ever found.
To take a guess in your case, maybe the equivalent is in
ExplorerManager.setSelectedNodes(). If so, maybe you could iterate
over all the opened TopComponents, pass each to ExplorerManager.find()
and then call setSelectedNodes on whatever you get back. Of course,
there's no preventing you from having multiple TCs open at once, each
with their own ExplorerManager, and this approach would likely fail in
such a case.
Hopefully someone can expound on the differences between
selected/activated/current nodes. If so, it might help you. I'd even
volunteer to document what they say in the Wiki and/or API
documentation.
On Tue, Mar 23, 2010 at 1:11 PM, bruehlicke <address-removed> wrote:
| Quote: | Maybe a dum question but I first run into this one lately.
Suppose I create some new children and they get added to the Node list
via updating the keys. Somehow the current selected Node gets changed
and I need to reset the selected Node to the one before I added
something .. how ?
I see that I can use TopComponent.Registry.getCurrentNode() before I
do my devastating action. OK. But how to "set" the current Selected
Node programatically after my action |
|
| Back to top |
|
 |
bruehlicke
Joined: 18 Sep 2009 Posts: 154
|
Posted: Wed Mar 24, 2010 7:24 pm Post subject: [platform-dev] Re: Reset currentSelected Node after a update of keys |
|
|
Thanx Tom,
yea - I have multiple Topcomponents open - but - lucky only one
Explorer Tree view - so this may work ...
B-)
On Wed, Mar 24, 2010 at 12:58 PM, Tom Wheeler <address-removed> wrote:
| Quote: | I have always been confused by the differences (if there are any)
between selected nodes, activated nodes and current nodes. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|