I have a TableView where I format the cells style based on the value (see code). I'm wondering if there's a way to format the entire row that cell belongs to based on that cells value or the value of the object (In my case step.getStatus()). This seems like it would be straight forward but I've struggled to find any reference to do it.
colStatus.setCellFactory(new Callback<TableColumn<Step, String>, TableCell<Step, String>>()
{
@Override
public TableCell<Step, String> call(TableColumn<Step, String> param) {
return new TableCell<Step, String>() {
@Override
protected void updateItem(String item, boolean empty) {
if (!empty) {
int currentIndex = indexProperty().getValue() < 0 ? 0 : indexProperty().getValue();
setText(param.getTableView().getItems().get(currentIndex).getStatus().name());
switch(param.getTableView().getItems().get(currentIndex).getStatus())
{
case Step.STATUS.Enabled:
setTextFill(Color.BLACK);
break;
case Step.STATUS.Disabled:
setTextFill(Color.GRAY);
break;
case Step.STATUS.Running:
setTextFill(Color.BLUEVIOLET);
break;
case Step.STATUS.Complete:
setTextFill(Color.LIME);
break;
case Step.STATUS.Error:
setTextFill(Color.RED);
setStyle("-fx-background-color: pink;");
break;
}
}
}
};
}
});


String