• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Focuslost listener for TableViewer

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an editable tableviewer. I want to sort the rows with the date value entered in the columns but when the user has lost focus on the row i.e. I want to do the sorting when the user has clicked onto a different row.
How do I add a focuslost listener to a TableViewer.
Thanks for any help.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anjali,

You need to implement ListSelectionListener. To implement it use table.getSelectionModel().addListSelectionListener(selectionListnere), where selectionListnere is a ListSelectionListener where you will have to override valueChanged() method.

valueChanged() method will be called as and when you change the row.

Hope it will help you.
cheers
 
reply
    Bookmark Topic Watch Topic
  • New Topic