• 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 and TableCursor

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Yet another stumbling block encountered while implementing an Excel-like function using JFace & SWT:-(

I have an implementation of ICellModifier, called MyCellModifier (along with MyLabelProvider & MyContentProvider). That setup work all fine - it allows the user to click on a cell, start editing & then press enter to register the new value.

I also needed to implement the keyboard navigation within my table (which is a jface TableViewer). To this end, I have

final TableCursor cursor = new TableCursor(iTableViewer.getTable(), SWT.NONE);
final ControlEditor editor = new ControlEditor(cursor);

This combination also works fine on its own. The trouble starts when I attempt to use both editing functionalities together. It seems that the TableCursor has some kind of precedence over ICellModifier. Adding TableCursor disables the ICellModifier & leaves the table only navigatble using the keyboard. A cell no longer becomes editable when you click on it!

Does anyone know how I can fix this.

Thank you
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic