|
|
Re: Decorating a boolean column with SWT [message #1403341 is a reply to message #1403193] |
Wed, 23 July 2014 06:15 |
Urs Beeli Messages: 573 Registered: October 2012 Location: Bern, Switzerland |
Senior Member |
|
|
Jérémie
Thank you for your help with the execPrepareEdit, I'll have a look at this. As to the initial value, maybe the following will work (untested):
@Override
protected IFormField execPrepareEdit(ITableRow row) throws ProcessingException {
AbstractBooleanField f = new AbstractBooleanField() {
};
f.setValue(getValue(row));
return f;
}
The need for the custom column comes not from this issue. We've already implemented a TriStateField to display a checkbox with three states (true, false, indeterminate) in order to represent a TriState object. We now also need to be able to display such values in tables. One option might be to use an ObjectColumn and to then set the icons accordingly and using execPrepareEdit to use the TriStateField instead of creating a custom TristateColumn. Anyway, thanks for the link (it's a bit embarrassing to see I've asked this question before , I'll have a look, though the blog article seems to focus mainly on RAP, I guess it would also work with SWT.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03047 seconds