I'm making a JavaFX project and using the Jfoenix custom library for nicer components. In a schedule table I have, I need the rows to become red if the start date of the event has passed already however I cannot find any answers online anywhere as to how I should iterate through the rows.
In my CSS file, I need this line to set the rows to red if they match the given criteria with the pseudo class toggleRed
.
.jfx-tree-table-view > .virtual-flow > .clipped-container > .sheet > .tree-table-row-cell:filled:toggleRed {
-fx-background-color: red;
}
So in my controller initialize method, I'm going to have this line if the row object is valid
row.pseudoClassStateChanged(PseudoClass.getPseudoClass("toggleRed"), true);
I need some kind of for-loop to get every table row in the table to call on this line but haven't found anything that works yet. Please help. I'm completely lost and have wasted far too much time on this. Thanks!!!