|Dynamic conditional highlighting [message #1693629]
||Mon, 27 April 2015 06:57
| Michael Gerlich
Registered: April 2015
I'm currently investigating if NatTable would be a suitable replacement for our current SWT/JFace TableViewers. In fact, the NatTable examples are really promising and I already could mimic some tables with NatTable.
I was wondering if it is possible to add some conditional highlighting based on a range of data. Like numeric values <= 100 are red, values between 101 and 150 are yellow and everything >151 would be green.
Currently, I only saw examples (and could modify them to my needs) where exact values are highlighted, which is fine if there aren't that many different values or they are backed by an enumeration.
But could this labeling system also deal with ranges of data values like my example before?
In addition, as all labeling/layers need to be registered prior to configuring the NatTable, the only way I could currently think of to make things work would be to keep some sort of "label stack" which stores the user defined labels and then disposes & reconfigures the NatTable again every time a label is added, deleted or modified.
So if in the above example the values for <= 100 should be blue, then one would need to remove/modify the existing label for red and re-iterate all values.
Would this be the only way for many different numeric values to provide conditional highlighting or am I missing something?
All the best,
Powered by FUDForum
. Page generated in 0.02209 seconds