Hi everyone!
My JavaFX 2.2 application allows to set an external CSS to a TableView.
table.getStylesheets().add(path);
This works and the style is set. However, I want to get the cell font size.
.table-row-cell{
-fx-font: 20px arial;
}
When I write
System.out.println(table.getStyle());
an empty string is returned.
If I use the inline style setting, for example
table.setStyle("-fx-font: 20px arial");
then getStyle works. It prints "-fx-font: 20px arial".
So what's the issue here? How can I read the table cells font after setting it with getStylesheets.add(css file)?
Obviously, I don't want to parse the whole CSS file if possible! Java CSS parsers are very lacking and they don't work properly for JavaFX CSS.