Customizing single-line-diagrams¶
The SldParameters class allows users to customize their single-line diagrams.
Customization options¶
Customize the svg rendering: see the
SvgParametersclass.Customize the layout: see the
LayoutParametersclass.Choose the component library: see the
ComponentLibraryclass.Customize labels and decorators: see the
LabelProviderFactoryandLabelProviderinterfaces.Highlight information on the diagram: see the
LabelProviderFactoryandLabelProviderinterfaces.Choose the layout algorithm for voltage levels: see the
VoltageLevelLayoutFactoryCreatorinterface.Choose the layout algorithm for substations: see the
SubstationLayoutFactoryinterface.Choose the layout algorithm for multi-substation diagrams: see the
ZoneLayoutFactoryinterface.
How to use it¶
Default values are defined for each customization aspect.
Users only need to define what they want to customize. In the following example, a customized ComponentLibrary is set,
as well as a customized StyleProvider.
SldParameters sldParameters = new SldParameters()
.setComponentLibrary(componentLibrary)
.setStyleProviderFactory(styleProviderFactory);
The sldParameters object should be then passed as an attribute to one of the SingleLineDiagram draw function. For example:
SingleLineDiagram.draw(network, voltageLevelOrSubstationId, pathToSvgFile, sldParameters);