• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jface tableviewer multi sort columns

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear all,
i am implementing a tableviewer that is able to sort values depengin on their column order. e.g. column1-column2-columnX sorts the rows first on the values of column 1, then column 2, column....
Therefore i want to use a ColumnViewerSorter, especially the method "int doCompare(Viewer viewer, Object e1, Object e2);"
inside this method i want to sort depending on other Tableviewer Row/Cells for comparison and the difficulty is that JFace tableviewer does the sort in the view only, so i have to "ask" the tableviewer itself for the actual

value of e.g. "column 1, row 20"

using the function "viewer.getElementAt(index)" inside "docompare" wold be ok, but inside docompare i do have no reference to the objects e1 and e2 position in the tableviewer.

how could i achieve that?

thanking you very much in advance for helping me

best regards,

Malcom
 
reply
    Bookmark Topic Watch Topic
  • New Topic