GraphVizDotML

izumi.fundamentals.graphs.dotml.GraphVizDotML
abstract class GraphVizDotML(var name: String = ..., var comment: String = ..., var strict: Boolean = ..., var graphAttr: Map[String, String] = ..., var nodeAttr: Map[String, String] = ..., var edgeAttr: Map[String, String] = ..., val body: ArrayBuffer[String] = ...)

Assemble, save, and render DOT source code, open result in viewer.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Digraph
class Graph

Members list

Value members

Concrete methods

def attr(kw: String, attrs: Map[String, String] = ...): Unit

Add a graph/node/edge attribute statement.

Add a graph/node/edge attribute statement.

Value parameters

attrs

Attributes to be set.

kw

Attributes target ("graph", "node", or "edge").

Attributes

def edge(tailName: String, headName: String, label: String = ..., attrs: Map[String, String] = ...): Unit

Create an edge between two nodes.

Create an edge between two nodes.

Value parameters

attrs

Any additional edge attributes (must be strings).

headName

End node identifier.

label

Caption to be displayed near the edge.

tailName

Start node identifier.

Attributes

def edges(tailName: String, headNames: Array[String]): Unit

Create a bunch of edges.

Create a bunch of edges.

Value parameters

headNames

End nodes identifier.

tailName

Start node identifier.

Attributes

def edges(tailHeads: Array[(String, String)]): Unit

Create a bunch of edges.

Create a bunch of edges.

Value parameters

tailHeads

array of (tailName, headName) pairs.

Attributes

def node(name: String, label: String = ..., attrs: Map[String, String] = ...): Unit

Create a node.

Create a node.

Value parameters

attrs

Any additional node attributes (must be strings).

label

Caption to be displayed (defaults to the node name).

name

Unique identifier for the node inside the source.

Attributes

def save(fileName: String, directory: String): String

Save the DOT source to file.

Save the DOT source to file.

Value parameters

directory

Directory for source saving and rendering.

filename

Filename for saving the source (defaults to name + ".gv")

Attributes

Returns

The (possibly relative) path of the saved source file.

def source(subGraph: Boolean = ...): String

The DOT source code as string.

The DOT source code as string.

Attributes

def subGraph(graph: GraphVizDotML): Unit

Add the current content of the given graph as subgraph.

Add the current content of the given graph as subgraph.

Value parameters

graph

An instance of the same kind (Graph, Digraph) as the current graph.

Attributes

Concrete fields

val body: ArrayBuffer[String]
var comment: String
var edgeAttr: Map[String, String]
var graphAttr: Map[String, String]
var name: String
var nodeAttr: Map[String, String]
var strict: Boolean