JavaFX CSS Shape as Graphic Node

时间:2018-12-03 13:24:04

标签: java css javafx javafx-css

I'm trying to load an circle shape into JavaFX TreeCell.

I've set the Graphic Shape programmatically like this:

Circle circle = new Circle(3);
circle.setFill(Color.RED);
cell.setGraphic(circle);

But now I'm trying to set the shape using CSS. So far I'm at the point, that I should be able to set the graphic by using

-fx-graphic: <uri>;

But by the CSS Reference Guide this is only applicable to URLs.

Is there any possibility to set the graphic as a shape only by using CSS?

0 个答案:

没有答案