Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Select next item in treeviewer after delete
Select next item in treeviewer after delete [message #467885] Mon, 03 August 2009 10:01
Phill Perryman is currently offline Phill Perryman
Messages: 214
Registered: July 2009
Senior Member
<br><font size=2 face="sans-serif">I have a JFace treeviewer which displays
data from my model. The user can right click to delete a node from the
tree. The handler removes the item from the model and fires a document
changed event to which the content outline page is listening. The tree
then refreshes and the item dissapears. The treeviewer can also be filtered.
The tree also displays logical and physical layouts so the same object
may appear in the tree twice.</font>
<br>
<br><font size=2 face="sans-serif">All I want to do is to change the selection
to the item after the one that is being deleted.</font>
<br>
<br><font size=2 face="sans-serif">At the moment the selection seems to
change back to the physical parent on refresh even if the selectd item
was in the logical layout. When deleting items from an element with many
screens of children you have to keep scrolling back down to get to the
next item to delete. Because a deleted item may cause orphan items in my
structure I also clean the model on deletion so I can only handle a single
deletion at a time.</font>
<br>
<br><font size=2 face="sans-serif">Any ideas how I can find the next visible
item in the tree after the selected one.</font>
Previous Topic:JEditorPane problem
Next Topic:Eclipse Icons
Goto Forum:
  


Current Time: Wed Oct 22 01:49:52 GMT 2014

Powered by FUDForum. Page generated in 0.04700 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software