Package stdlib
Class GraphvizBuilder
java.lang.Object
stdlib.GraphvizBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final class
private static interface
private static final class
private static enum
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addBinaryHeap
(double[] heap, int N) private void
addBinaryHeap
(Object[] heap, int N) void
addEdge
(int src, int dst) void
void
void
private void
addEdgeString
(String src, String dst) private void
addEdgeString
(String src, String dst, String properties) void
void
addLabeledEdge
(int src, int dst, double label) void
addLabeledEdge
(int src, int dst, double label, String properties) void
addLabeledEdge
(int src, int dst, float label) void
addLabeledEdge
(int src, int dst, float label, String properties) void
addLabeledEdge
(int src, int dst, int label) void
addLabeledEdge
(int src, int dst, int label, String properties) void
addLabeledEdge
(int src, int dst, String label) void
addLabeledEdge
(int src, int dst, String label, String properties) void
addLabeledEdge
(Object src, Object dst, double label) void
addLabeledEdge
(Object src, Object dst, double label, String properties) void
addLabeledEdge
(Object src, Object dst, float label) void
addLabeledEdge
(Object src, Object dst, float label, String properties) void
addLabeledEdge
(Object src, Object dst, int label) void
addLabeledEdge
(Object src, Object dst, int label, String properties) void
addLabeledEdge
(Object src, Object dst, String label) void
addLabeledEdge
(Object src, Object dst, String label, String properties) private void
addLabeledEdgeString
(String src, String dst, double label) private void
addLabeledEdgeString
(String src, String dst, double label, String properties) private void
addLabeledEdgeString
(String src, String dst, float label) private void
addLabeledEdgeString
(String src, String dst, float label, String properties) private void
addLabeledEdgeString
(String src, String dst, int label) private void
addLabeledEdgeString
(String src, String dst, int label, String properties) private void
addLabeledEdgeString
(String src, String dst, String label) private void
addLabeledEdgeString
(String src, String dst, String label, String properties) void
addLabeledNode
(int id, String label) void
addLabeledNode
(int id, String label, String properties) void
addLabeledNode
(Object o, String label) void
addLabeledNode
(Object o, String label, String properties) private void
addLabeledNodeString
(String id, String label) private void
addLabeledNodeString
(String id, String label, String properties) void
addLabeledNullEdge
(Object src, String label) void
addLabeledNullEdgeString
(String src, String label) void
addNode
(int id) void
void
void
private void
private void
private void
addNodeString
(String id) private void
addNodeString
(String id, String properties) void
addNullEdge
(Object src) void
addNullEdgeString
(String src) private void
addUF
(int[] uf) static void
binaryHeapToFile
(double[] heap, int N) static void
binaryHeapToFile
(double[] heap, int N, String filename) static void
binaryHeapToFile
(Object[] heap, int N) static void
binaryHeapToFile
(Object[] heap, int N, String filename) private static boolean
canAppearUnquotedInLabel
(char c) private static String
private static String
private static String
getId
(int i) private static String
private static String
getLabel
(double d) private static String
getLabel
(float f) private static String
getLabel
(int i) private static String
private static String
private static PrintWriter
getPrintWriter
(File file) private static String
getProperties
(String label, String properties) static void
private static boolean
static void
nodesToFile
(Object root) Shows simple recursive data structures.static void
nodesToFile
(Object root, String filename) private static void
nodesToFile
(Object root, String properties, boolean withLabeledEdges) static void
nodesToFile
(Object root, String filename, String properties, boolean withLabeledEdges) protected static String
static void
setBaseDirName
(String baseDirName) Graphics files are saved in directory baseDirName/Graphviz.private static void
void
void
private void
toFile
(GraphvizBuilder.Type type, boolean keepGvFile, String filename, String properties) void
toFileUndirected
(String filename) void
toFileUndirected
(String filename, String properties) static void
ufToFile
(int[] uf) static void
private static String
Unescapes a string that contains standard Java escape sequences.
-
Field Details
-
DOT_EXTENSIONS
-
DOT_OUTPUT_FORMATS
-
GRAPHVIZ_POSSIBLE_DOT_LOCATIONS
-
defaultGraphProperties
-
defaultNodeProperties
-
defaultEdgeProperties
-
nullNodeProperties
-
nullEdgeProperties
-
fileCount
-
quotable
- See Also:
-
elements
-
nullId
-
baseDirName
-
dirName
-
-
Constructor Details
-
GraphvizBuilder
public GraphvizBuilder()
-
-
Method Details
-
graphvizAddPossibleDotLocation
-
getProperties
-
binaryHeapToFile
-
binaryHeapToFile
-
ufToFile
-
nodesToFile
Shows simple recursive data structures. The class of the root parameter is taken to be the must be an element of the recursive node class.- Parameters:
root
-
-
nodesToFile
-
nodesToFile
-
binaryHeapToFile
-
binaryHeapToFile
-
ufToFile
-
nodesToFile
public static void nodesToFile(Object root, String filename, String properties, boolean withLabeledEdges) -
addBinaryHeap
-
addBinaryHeap
-
addUF
-
addNodes
-
addNodes
-
getId
-
getId
-
getLabel
-
getLabel
-
getLabel
-
getLabel
-
getLabel
-
canAppearUnquotedInLabel
-
quote
-
unescapeJavaString
Unescapes a string that contains standard Java escape sequences.- \\b \\f \\n \\r \\t \\" \\' : BS, FF, NL, CR, TAB, double and single quote.
- \\N \\NN \\NNN : Octal character specification (0 - 377, 0x00 - 0xFF).
- \\uNNNN : Hexadecimal based Unicode character.
- Parameters:
st
- A string optionally containing standard java escape sequences.- Returns:
- The translated string.
-
addNode
-
addNode
-
addLabeledNode
-
addLabeledNode
-
addNode
-
addNode
-
addLabeledNode
-
addLabeledNode
-
addNodeString
-
addNodeString
-
addLabeledNodeString
-
addLabeledNodeString
-
addEdge
-
addEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addEdge
-
addEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addLabeledEdge
-
addEdgeString
-
addEdgeString
-
addLabeledEdgeString
-
addLabeledEdgeString
-
addLabeledEdgeString
-
addLabeledEdgeString
-
addLabeledEdgeString
-
addLabeledEdgeString
-
addLabeledEdgeString
-
addLabeledEdgeString
-
addNullEdge
-
addNullEdgeString
-
addFromNullEdgeString
-
addLabeledNullEdge
-
addLabeledNullEdgeString
-
getPrintWriter
-
getGvExecutable
-
toFileUndirected
-
toFileUndirected
-
toFile
-
toFile
-
toFile
private void toFile(GraphvizBuilder.Type type, boolean keepGvFile, String filename, String properties) -
setBaseDirName
Graphics files are saved in directory baseDirName/Graphviz. If baseDirName is a relative pathname, then it is placed in the users Desktop folder. baseDirName directory is created if it does not already exist. If baseDirName/Graphviz exists, then numbers are appended to the directory name: "baseDirName/Graphviz 1", "baseDirName/Graphviz 2", etc. -
isWindows
-
getDesktop
-
setDirName
-