Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Using wildcards in configLabels
Using wildcards in configLabels [message #1194119] Mon, 18 November 2013 10:50 Go to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member
Hi,

For registering config attributes we have to specify the exact configLabel string. My requirement is that I need to set style on all the cells whose configLabels contain a certain substring

I want to do something like this

registerConfigAttribute(CellConfigAttributes.CELL_STYLE, style, DisplayMode.NORMAL, contains("abc"));

Is it possible?
Re: Using wildcards in configLabels [message #1194141 is a reply to message #1194119] Mon, 18 November 2013 11:02 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
No this is currently not supported
Re: Using wildcards in configLabels [message #1194142 is a reply to message #1194141] Mon, 18 November 2013 11:03 Go to previous messageGo to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member
Can you suggest any workaround for this Dirk as I badly need this functionality
Re: Using wildcards in configLabels [message #1194157 is a reply to message #1194142] Mon, 18 November 2013 11:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Looking into the implementation the value is searched in a map via key. So the only workaround is to maybe register an additional label that is the same for all against which you register the style rather than registering the style for each label.
Re: Using wildcards in configLabels [message #1194191 is a reply to message #1194157] Mon, 18 November 2013 11:35 Go to previous messageGo to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member

thanks Dirk.

Do you think its worth implementing if I request an enhancement for this?

This is useful when labels are generated dynamically and we are not aware of them in advance.
Re: Using wildcards in configLabels [message #1194222 is a reply to message #1194191] Mon, 18 November 2013 11:54 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Quote:
This is useful when labels are generated dynamically and we are not aware of them in advance.


If you are not aware of them you are not able to register something against them. As I said you could always add a additional label for specifying the style as it is the same for all of those columns. If you know that label "myColumn_42" is using a style because it starts with "myColumn_", why not adding the additional label "myStyleColumn" for specifying the style then. Doing this you are able to solve your issue quite easy.

Quote:
Do you think its worth implementing if I request an enhancement for this?


It would mean to reimplement the whole label mechanism internally. So it won't happen in NatTable 1.x. And I'm not sure if it really adds value as "contains", "startsWith" and "endsWith" checks mean to loose performance on the other hand. Adding an additional label as stated above shouldn't have much negative impact.
Previous Topic:Enabling checkbox in NATTable with data provider which is represented by a Boolean List
Next Topic:Using Filterator and RowHideShowLayer together
Goto Forum:
  


Current Time: Thu Apr 25 19:05:52 GMT 2024

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

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

Back to the top