Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » CommonNavigator: allowing the selection of one element only
CommonNavigator: allowing the selection of one element only [message #714952] Thu, 11 August 2011 17:23 Go to next message
Eclipse UserFriend
Hi,

I extend a CommonNavigtor for a view. This view is intended to serve as the master in a master-detail pattern (I have a second view to show the detail). Therefore, I need to be able to select only 1 item in my CommonNavigator view. How to achieve that?

Thanks,

McNuggets
Re: CommonNavigator: allowing the selection of one element only [message #714956 is a reply to message #714952] Thu, 11 August 2011 17:51 Go to previous messageGo to next message
Eclipse UserFriend
You will need to subclass the CommonNavigator class and override this method:

	protected CommonViewer createCommonViewerObject(Composite aParent) {
		return new CommonViewer(getViewSite().getId(), aParent,
				SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
	}


Change the SWT.MULTI to SWT.SINGLE
Re: CommonNavigator: allowing the selection of one element only [message #714962 is a reply to message #714956] Thu, 11 August 2011 18:26 Go to previous message
Eclipse UserFriend
Hello,

So thanks again, this is perfect, it just works fine with SWT.SINGLE.

Cheers
Previous Topic:CommonNavigator: removing the "Link with Editor" button
Next Topic:Setting Status Line.
Goto Forum:
  


Current Time: Sun Jul 13 15:13:45 EDT 2025

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

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

Back to the top