Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Info about applied Filter
Info about applied Filter [message #1218913] Fri, 29 November 2013 13:53 Go to next message
Arjan Kok is currently offline Arjan KokFriend
Messages: 40
Registered: July 2009
Member
Hi,

I am using the default Nattable filtering (based on glazedlists.filterlist), and it work fine.
Now I would like to implement a feature, that tells the user of the table how many rows were filtered.
Something like this : 4 out of 10.

Does this feature exist? I did not find it in the examples.

Kind Regards,
Arjan Kok.
Re: Info about applied Filter [message #1219014 is a reply to message #1218913] Fri, 29 November 2013 15:50 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
no such a feature does not exist. Should be easy by asking the underlying list and the filterlist about its size
Re: Info about applied Filter [message #1219149 is a reply to message #1218913] Mon, 02 December 2013 11:45 Go to previous messageGo to next message
Arjan Kok is currently offline Arjan KokFriend
Messages: 40
Registered: July 2009
Member
Ok, thanks.

I tried to register a listener for the FilterAppliedEvent on the Top Layer (a GridLayer in my case).
However, it does not get called ?!

this.addLayerListener(new ILayerListener() {
public void handleLayerEvent(ILayerEvent event) {
if (event instanceof FilterAppliedEvent) {
System.out.println("filter applied event");
}
}
});


Is this the correct way to get it done?

Kind Regards, Arjan.
Re: Info about applied Filter [message #1219155 is a reply to message #1219149] Mon, 02 December 2013 12:14 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
This should work. Did you create your own GridLayer? As you are registering by using "this"
Re: Info about applied Filter [message #1219182 is a reply to message #1219155] Mon, 02 December 2013 14:11 Go to previous message
Arjan Kok is currently offline Arjan KokFriend
Messages: 40
Registered: July 2009
Member
Yes, I created my own grid layer. Strange enough, adding the listener on the table itself seems to work Smile.

Thanks for your quick support.

Kind Regards,
Arjan.
Previous Topic:Traverse in filter row with tab key
Next Topic:Unable to retrieve index in model from selection
Goto Forum:
  


Current Time: Fri Mar 29 14:07:48 GMT 2024

Powered by FUDForum. Page generated in 0.03393 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top