Skip to main content


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 13:05 Go to next message
mark tal is currently offline mark talFriend
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 09:06 Go to previous message
Igor Zapletnev is currently offline Igor ZapletnevFriend
Messages: 33
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: Tue Apr 23 12:17:53 GMT 2024

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

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

Back to the top