NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

[platform-dev] Re: Reset currentSelected Node after a update of keys

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
tomwheeler



Joined: 03 Sep 2008
Posts: 950

PostPosted: Wed Mar 24, 2010 5:58 pm    Post subject: [platform-dev] Re: Reset currentSelected Node after a update of keys Reply with quote

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

PostPosted: Wed Mar 24, 2010 7:24 pm    Post subject: [platform-dev] Re: Reset currentSelected Node after a update of keys Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
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