Skip to main content



      Home
Home » Eclipse Projects » GEF » ScrollingGraphicalViewer Select and Unselect listener
ScrollingGraphicalViewer Select and Unselect listener [message #929434] Mon, 01 October 2012 09:05 Go to next message
Eclipse UserFriend
I need to fire a method when a figure is selected in GEF diagram.
addSelectionChangedListener works well when I select a figure, but if i click on the same figure again ("unselect") the listener doesn't fire.

How can i fix it?


final GraphicalViewer viewer = new ScrollingGraphicalViewer();
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
     public void selectionChanged(SelectionChangedEvent event) {
	//Fired when figure is selected, but not when same figure is selected again
				
     }
});
Re: ScrollingGraphicalViewer Select and Unselect listener [message #930382 is a reply to message #929434] Tue, 02 October 2012 05:06 Go to previous message
Eclipse UserFriend
Hi,

For your cases you need to define custom SelectionManager.class and set it to the your own GraphicalViewer.

Thanks,
Igor
Previous Topic:GraphicalEditor in Composite
Next Topic:[Zest] getToolTip in a graph?
Goto Forum:
  


Current Time: Sat Jul 05 07:01:18 EDT 2025

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

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

Back to the top