11/*
2- STYLESHEET FOR JAVAFXGRAPH VISUALIZATION
2+ STYLESHEET FOR SMARTGRAPH VISUALIZATION.
3+
4+ For your customization, please see:
5+ https://openjfx.io/javadoc/19/javafx.graphics/javafx/scene/doc-files/cssref.html
6+
7+ And know that:
8+ - The drawing area itself is of type Pane, which is an extension of Region;
9+ - A vertex is of type Circle;
10+ - The edges are of type Line and CubicLine;
11+ - The labels are of type Text, and;
12+ - The arrows are of type Path.
13+
14+ This should help you understand which styles you can apply.
315*/
416
517.graph {
6- -fx-background-color : # F4FFFB ;
18+ -fx-background-color : # F4FFFB ;
19+ /* you can use -fx-background-image to set a background image */
720}
821
922.vertex {
@@ -13,15 +26,20 @@ STYLESHEET FOR JAVAFXGRAPH VISUALIZATION
1326 -fx-fill : # B1DFF7 ;
1427}
1528
29+ .vertex : hover { /* pseudo-classes also work */
30+ /*-fx-cursor: default; */ /* You can use this style to override the hand/move cursors while hovering. */
31+ -fx-stroke-width : 4 ;
32+ }
33+
1634.vertex-label {
1735 -fx-font : bold 8pt "sans-serif" ;
1836}
1937
2038.edge {
2139 -fx-stroke-width : 2 ;
2240 -fx-stroke : # FF6D66 ;
23- -fx-stroke-dash-array : 2 5 2 5 ; /* remove for clean edges */
24- -fx-fill : transparent; /*important for curved edges */
41+ -fx-stroke-dash-array : 2 5 2 5 ; /* remove for clean lines */
42+ -fx-fill : transparent; /* important to keep for curved edges */
2543 -fx-stroke-line-cap : round;
2644 -fx-opacity : 0.8 ;
2745}
@@ -39,7 +57,7 @@ STYLESHEET FOR JAVAFXGRAPH VISUALIZATION
3957/* Custom vertex. You should revert any unwanted styling in the default element,
4058 style, since custom styles will be appended to the default style */
4159.myVertex {
42- -fx-stroke-width : 5 ;
60+ -fx-stroke-width : 4 ;
4361 -fx-stroke : green;
4462 -fx-stroke-type : inside; /* you should keep this if using arrows */
4563 -fx-fill : yellowgreen;
0 commit comments