Sam Zheng
Sam Zheng

Reputation: 43

jface tableviewer, how to use different cell editor for each cell?

is there a way to specify different cell editor for each cell in jface tableviewer, I know that the cell editor is specified on a column basis, but I want to specify the cell editor on a cell basis, is there a workaround or is it possible?

Upvotes: 0

Views: 1283

Answers (1)

Martti Käärik
Martti Käärik

Reputation: 3621

EditingSupport that you set to ViewerColumn is dynamic. When cell edit is triggered, the framework calls CellEditor getCellEditor(Object element) method on your editing support implementation. In that method you can choose to return any editor depending on the passed row element.

Upvotes: 2

Related Questions