When a TreeCell uses a graphic where one of the components is a custom component that uses its clip to indicate its current state then this part of the cell is in some cases not properly refreshed. The same component works fine outside the TreeCell.
Since this is rather hard to explain, I've attached a full working example where 3 trees are shown side-by-side, one of them bugged, and two of them working correctly with possible work-arounds. The example is a version of code at https://github.com/hjohn/MediaSystem stripped of everything that didn't seem relevant, although I'm sure it can be stripped down even further. See also this post: https://forums.oracle.com/forums/thread.jspa?threadID=2338943&tstart=0
The buggy control in question is located in StarRating.java, and it has 3 modes, bugged mode, change opacity mode and listener mode. In the first mode it only attaches the proper binds to its rating property to influence the clip; in the second mode, it also binds the opacity property (to help the system detect that the graphic really changed); and in the third mode it adds 3 listeners to get the same effect.
When running the example (run the main method in RefreshBug.java), you will see 3 trees. The left one is the bugged one. Each of these 3 has 4 items which are being refreshed in turn in spaces of 0.5 seconds. You will see that all trees refresh the Date properly (the year display changes into a date). But only the right 2 trees will also refresh the 5 stars to show the correct rating.
This example runs in full screen mode. Note that after the fullscreen message disappears, a full refresh is triggered and after that the left tree will also display the correct star ratings.
Since this is rather hard to explain, I've attached a full working example where 3 trees are shown side-by-side, one of them bugged, and two of them working correctly with possible work-arounds. The example is a version of code at https://github.com/hjohn/MediaSystem stripped of everything that didn't seem relevant, although I'm sure it can be stripped down even further. See also this post: https://forums.oracle.com/forums/thread.jspa?threadID=2338943&tstart=0
The buggy control in question is located in StarRating.java, and it has 3 modes, bugged mode, change opacity mode and listener mode. In the first mode it only attaches the proper binds to its rating property to influence the clip; in the second mode, it also binds the opacity property (to help the system detect that the graphic really changed); and in the third mode it adds 3 listeners to get the same effect.
When running the example (run the main method in RefreshBug.java), you will see 3 trees. The left one is the bugged one. Each of these 3 has 4 items which are being refreshed in turn in spaces of 0.5 seconds. You will see that all trees refresh the Date properly (the year display changes into a date). But only the right 2 trees will also refresh the 5 stars to show the correct rating.
This example runs in full screen mode. Note that after the fullscreen message disappears, a full refresh is triggered and after that the left tree will also display the correct star ratings.