You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: network-area-diagram/src/main/java/com/powsybl/nad/svg/CustomStyleProvider.java
+44-20Lines changed: 44 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -17,30 +17,54 @@
17
17
importjava.util.stream.Stream;
18
18
19
19
/**
20
+
* Enables the customization of the style of NAD elements: Bus nodes, branch-edges and three-winding-transformers edges.
21
+
*
22
+
* <p>
23
+
* NAD elements'style data is defined in the CustomStyleProvider constructor's map parameters.
24
+
*
25
+
* <p>
26
+
* The busNodesStyles map is indexed by the bus ID and defines the style for the bus nodes.
27
+
* In the map, a node style is declared in a BusNodeStyles record: fill, edge and edgeWidth are the fill color, the edge color and the edge size for the node, respectively.
28
+
*
29
+
* <p>
30
+
* The edgesStyles map is indexed by the branch ID and defines the style for the edges.
31
+
* In the map, the edge style is declared in a EdgeStyles record: edge1, width1 and dash1 are the color, the size and a dash pattern for the first half edge, respectively.
32
+
* Edge2, width2 and dash2 are the color, the size and a dash pattern for the second half edge.
33
+
*
34
+
* <p>
35
+
* The threeWtsStyles map is index by the three-winding-transformer ID and defines the style for the transformer’s legs.
36
+
* In the map, the style is declared in a ThreeWtStyles record: edge1, width1, dash1, edge2, width2 and dash2, edge3, width23 and dash3,
37
+
* are the color, the size and a dash pattern for the three legs of the transformer.
38
+
*
39
+
* <p>
40
+
* Note that the edge size is a string, it can be specified in pixel (e.g, 4px).
41
+
* A dash pattern is a string with a sequence of comma and/or white space separated lengths and percentages, that specify the lengths of alternating dashes and gaps in the edge.
42
+
* Elements that do not have a style specified in the parameters will be displayed with a default style.
43
+
*
20
44
* @author Christian Biasuzzi {@literal <christian.biasuzzi at soft.it>}
0 commit comments