Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
mark tal is currently offline mark tal
Messages: 11
Registered: July 2012
Junior Member
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
Igor Zapletnev is currently offline Igor Zapletnev
Messages: 32
Registered: September 2012
Member
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: Fri Aug 29 10:16:12 EDT 2014

Powered by FUDForum. Page generated in 0.02366 seconds