I want set the the graphics of starting cell to an eror image when there is any error in the table view data(any row data).I am using the following code inside the update method.
public void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
String text = getString();
setText(empty ? null : text);
String text2 = text.trim();
boolean isHex = text2.matches("^[0-9A-Fa-fx]+$");
// Pattern compile = Pattern.compile("^[0-9A-Fa-fx]+.*");
// Matcher matcher = compile.matcher(text);
// boolean find = matcher.find();
// getTableView().getColumns().;
setGraphic(null);
if (!isHex) {
getStyleClass().add("oneCell");
// this.setTextFill(Color.RED);
// getTableView().getColumns().get(0;
revertbackchanges();
Image error = new Image(getClass().getResourceAsStream("twobuttons/icon_error_1.png"));
} else {
setGraphic(null);
getStyleClass().remove("oneCell");
}
here i am checking the cell data whether the data are hex value or not if other than hex is entered then i am changing the color of the cell to red .Now i want to show a error like icon on the 1st cell .How can i get the 1st cell from table view and set the graphics on it.As shown on image i can show an error with respective to cell on which user has entered the wrong value but along with that i want to show and error icon on Command cell i.e TX_default or i want to highlight the whole cell .Any help on this is really appreciated