Class GraphvizShapeConfig
- java.lang.Object
-
- org.testingisdocumenting.znai.diagrams.graphviz.meta.GraphvizShapeConfig
-
public class GraphvizShapeConfig extends java.lang.ObjectWe can assign a node style by adding an extra information to labelnode [label="text [a database]"];In the example above two styles are set. A style can change a color scheme. Also style can change a shape. Graphviz has predefined shapes that can be specified explicitly. Instead of doing it explicitly though, we will specify it during preprocessing and at the final rendering will replace that shape with a custom svg. So 'database' style may be auto rendered as a SVG showing a data storage. And in order to make all the lines connect properly a shape must be of a proper height, width and if possible, shape.
-
-
Constructor Summary
Constructors Constructor Description GraphvizShapeConfig(java.lang.String json)GraphvizShapeConfig(java.util.Map<java.lang.String,?> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,?>getSvgByName()booleanisInvertedTextColorByStyleId(java.lang.String style)java.util.Optional<GraphvizNodeShape>nodeShape(java.lang.String style)java.util.Optional<java.lang.String>shapeSvg(java.lang.String style)
-
-
-
Method Detail
-
shapeSvg
public java.util.Optional<java.lang.String> shapeSvg(java.lang.String style)
-
isInvertedTextColorByStyleId
public boolean isInvertedTextColorByStyleId(java.lang.String style)
-
nodeShape
public java.util.Optional<GraphvizNodeShape> nodeShape(java.lang.String style)
-
getSvgByName
public java.util.Map<java.lang.String,?> getSvgByName()
-
-