Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » how to accumulate labels and apply painters on row header layer ?
how to accumulate labels and apply painters on row header layer ? [message #1154712] Fri, 25 October 2013 11:53 Go to next message
SD Khan is currently offline SD KhanFriend
Messages: 63
Registered: May 2013
Member
Hi Dirk !

I have a table with 100 rows, and i am accumulating labels on row header layer like in a way so that every row with position n has a label ROW_n, now when when i launch table, currently 50 rows are visible to me with positions 0-50, now i want to set painter on row header with label Row_95 , but as in a current view only 50 rows are visible so i am unable to apply style/painter on that row,

In more simple words those rows which are not visible in the current view and appears after scrolling, how i can accumulate labels on them to apply painters/styles?,

Regards,
SD Khan
Re: how to accumulate labels and apply painters on row header layer ? [message #1154728 is a reply to message #1154712] Fri, 25 October 2013 12:09 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
I think you still have not understood the basic concepts of NatTable and its configuration. Why would you need to apply styles to cells that are not visible?

NatTable is a virtual table. So it only handles the visible cells. There is no need to operate on cells that are not visible. Doing this would break the virtual nature.

As said in the topic before, you just apply labels via label accumulator. And they get applied when the cells are rendered. You register your styles in a new configuration implementation. And you add your new configuration against your NatTable instance. This way you do a loose coupling of the logic you apply for styling and the styling itself.

If you are doing your stuff in another way, you are doing it wrong as you break the concepts of NatTable and its virtual nature.
Re: how to accumulate labels and apply painters on row header layer ? [message #1154750 is a reply to message #1154728] Fri, 25 October 2013 12:30 Go to previous messageGo to next message
SD Khan is currently offline SD KhanFriend
Messages: 63
Registered: May 2013
Member
Thnaks !, Yup, i got your point. Actually, i am getting different requirements from the client, so that's why asking about these different scenarios. As you said "There is no need to operate on cells that are not visible" but the same thing works when we apply labels on data layer and data layer does cater those non visible cells. Just for getting my view clear "Is there any specific reason about why Row Header Layer acts as virtual but Data layer do behaves in a normal way"?

Regards,
Safdar Khan
Re: how to accumulate labels and apply painters on row header layer ? [message #1154780 is a reply to message #1154750] Fri, 25 October 2013 12:52 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
The reason is that the ViewportLayer adds the virtual nature. The RowHeaderLayer is dependent on that. The DataLayer is not virtual, as it does not need to be. The DataLayer only gets asked for the data values for cells that are visible. If you are operating on it yourself, you are skipping the virtual thing.
Re: how to accumulate labels and apply painters on row header layer ? [message #1162197 is a reply to message #1154780] Wed, 30 October 2013 08:10 Go to previous message
SD Khan is currently offline SD KhanFriend
Messages: 63
Registered: May 2013
Member
Thanks !, I got your point. Smile
Previous Topic:Right way to traverse cells and apply styles ?
Next Topic:Bulk/batch validation of entire table?
Goto Forum:
  


Current Time: Mon Aug 19 14:31:40 GMT 2019

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

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

Back to the top