当表内容发生更改时,在SWT中触发了哪个事件

时间:2021-11-27 22:24:05

I have a TableViewer object in SWT with some filters. So when the filter changes the content of the Table of TableViewerchanges too. I searched for an event that is fired when a TableItem is added or removed from the Table but found nothing. Is there such an event?

我在SWT中有一个带有一些过滤器的TableViewer对象。因此,当过滤器也更改TableViewerchanges表的内容时。我搜索了一个事件,当一个TableItem从表中添加或删除但没有找到任何内容时触发。有这样的事件吗?

I want to use all the shown rows for a calculation, so my handler can manage the statistics - like a sum of a column i.e. - and that's why I need the event.

我想使用所有显示的行进行计算,因此我的处理程序可以管理统计信息 - 比如列的总和,即 - 这就是我需要事件的原因。

1 个解决方案

#1


0  

When you filter do you call setInput explicitely? If so, look at your contentprovider inputChanged method. I think it could be a solution for your problem.

过滤时你是否明确地调用setInput?如果是这样,请查看contentprovider inputChanged方法。我认为它可以解决您的问题。

#1


0  

When you filter do you call setInput explicitely? If so, look at your contentprovider inputChanged method. I think it could be a solution for your problem.

过滤时你是否明确地调用setInput?如果是这样,请查看contentprovider inputChanged方法。我认为它可以解决您的问题。