Typically when styling JavaFX Button controls a user of the API can use the CSS -fx-graphic attribute to point to a url of an image file. However, it would be nice if the same attribute could use SVG paths.
For example, you could create a plus sign like so:
-fx-graphic: "M0,-1 V1 M-1,0 H1";
NOTE: Currently in JavaFX this can be acheived like the following:
StackPane buttonGraphic = new StackPane();
buttonGraphic.getStyleClass().add("plus");
Button button = new Button("blah");
button.setGraphic(buttonGraphic);
/* A button with a plus sign */
.button .plus { -fx-shape: "M0,-1 V1 M-1,0 H1"; }
For example, you could create a plus sign like so:
-fx-graphic: "M0,-1 V1 M-1,0 H1";
NOTE: Currently in JavaFX this can be acheived like the following:
StackPane buttonGraphic = new StackPane();
buttonGraphic.getStyleClass().add("plus");
Button button = new Button("blah");
button.setGraphic(buttonGraphic);
/* A button with a plus sign */
.button .plus { -fx-shape: "M0,-1 V1 M-1,0 H1"; }