0

I've searched for ages and have come up short. I have a TableView that is receiving data from another source (not the user).

One of the TableColumn in my TableView is an Integer column and for a cell in this column I would like to be able to set the cell color red if the new integer value is lower than the current (old) value, and green if its above the current (old) value.

I can find plenty of examples that use setOnEditCommit but none that show how this could be done when there is no user input.

Does anyone have any ideas on how I could approach this ?

Thanks

AVSG
  • 23
  • 2
  • Try to search this site in above top-right search area. To get more accurate results see "Advanced search tips" link at stackoverflow.com/search. – Uluk Biy Aug 09 '15 at 11:59
  • I've used the search here and pretty much everywhere else, however every example I find is one where a user is selecting. I'm in the position where the user is watching and NOT selecting, the data is coming in and updating the underlying ObservableList from an entirely different source. My first thought is to use a ChangeListener on the column but thats not available to me. – AVSG Aug 09 '15 at 17:14
  • See http://stackoverflow.com/questions/16153838/updating-tableview-row-appearance or http://stackoverflow.com/questions/27281370/javafx-tableview-format-one-cell-based-on-the-value-of-another-in-the-row or http://stackoverflow.com/questions/10699655/combo-box-key-value-pair-in-javafx-2. The last one is about ListCell but it is also applicable for TableCells. – Uluk Biy Aug 10 '15 at 05:34

0 Answers0