Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jface TableViewer and TableCursor

Alex teral
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic