Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » doubleclick listener disposal?
doubleclick listener disposal? [message #323882] Thu, 10 January 2008 23:46
Ric Wright is currently offline Ric WrightFriend
Messages: 70
Registered: July 2009
I am relatively new to JFace. I have a simple dialog I created that
subclasses Dialog. The relevant snipper is shown below. It works fine,
but strangely (to me, at least). If I do double-click in the list view,
it WORKS fine, but I can no longer get any mouse events for the
Composite that forms the view I am working on. If I select from the
viewer and simply press the OK button, it's all OK. This seems like a
bug, but perhaps I am missing something?

TIA, Ric

protected Control createDialogArea( Composite parent )
Composite composite = (Composite) super.createDialogArea(parent);
List list = new List(composite, SWT.BORDER);

viewer = new ListViewer(list);

viewer.addSelectionChangedListener(new ISelectionChangedListener()
public void selectionChanged(SelectionChangedEvent event)
IStructuredSelection selection = (IStructuredSelection)
currentSelection = selection.getFirstElement().toString();

viewer.addDoubleClickListener(new IDoubleClickListener()
public void doubleClick(DoubleClickEvent event)

// tell the list viewer the source of the data

Object[] selectedItems = new Object[1];
selectedItems[0] = currentSelection;
IStructuredSelection selection = new
viewer.setSelection(selection, true );

return composite;
Previous Topic:Contents of not being parsed at runtime.
Next Topic:Errors on certain resources - Exclude resource from any validation
Goto Forum:

Current Time: Sat May 26 02:42:28 GMT 2018

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

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

Back to the top