Package stdlib
Class GraphvizBuilder
java.lang.Object
stdlib.GraphvizBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static interfaceprivate static final classprivate static enum -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddBinaryHeap(double[] heap, int N) private voidaddBinaryHeap(Object[] heap, int N) voidaddEdge(int src, int dst) voidvoidvoidprivate voidaddEdgeString(String src, String dst) private voidaddEdgeString(String src, String dst, String properties) voidvoidaddLabeledEdge(int src, int dst, double label) voidaddLabeledEdge(int src, int dst, double label, String properties) voidaddLabeledEdge(int src, int dst, float label) voidaddLabeledEdge(int src, int dst, float label, String properties) voidaddLabeledEdge(int src, int dst, int label) voidaddLabeledEdge(int src, int dst, int label, String properties) voidaddLabeledEdge(int src, int dst, String label) voidaddLabeledEdge(int src, int dst, String label, String properties) voidaddLabeledEdge(Object src, Object dst, double label) voidaddLabeledEdge(Object src, Object dst, double label, String properties) voidaddLabeledEdge(Object src, Object dst, float label) voidaddLabeledEdge(Object src, Object dst, float label, String properties) voidaddLabeledEdge(Object src, Object dst, int label) voidaddLabeledEdge(Object src, Object dst, int label, String properties) voidaddLabeledEdge(Object src, Object dst, String label) voidaddLabeledEdge(Object src, Object dst, String label, String properties) private voidaddLabeledEdgeString(String src, String dst, double label) private voidaddLabeledEdgeString(String src, String dst, double label, String properties) private voidaddLabeledEdgeString(String src, String dst, float label) private voidaddLabeledEdgeString(String src, String dst, float label, String properties) private voidaddLabeledEdgeString(String src, String dst, int label) private voidaddLabeledEdgeString(String src, String dst, int label, String properties) private voidaddLabeledEdgeString(String src, String dst, String label) private voidaddLabeledEdgeString(String src, String dst, String label, String properties) voidaddLabeledNode(int id, String label) voidaddLabeledNode(int id, String label, String properties) voidaddLabeledNode(Object o, String label) voidaddLabeledNode(Object o, String label, String properties) private voidaddLabeledNodeString(String id, String label) private voidaddLabeledNodeString(String id, String label, String properties) voidaddLabeledNullEdge(Object src, String label) voidaddLabeledNullEdgeString(String src, String label) voidaddNode(int id) voidvoidvoidprivate voidprivate voidprivate voidaddNodeString(String id) private voidaddNodeString(String id, String properties) voidaddNullEdge(Object src) voidaddNullEdgeString(String src) private voidaddUF(int[] uf) static voidbinaryHeapToFile(double[] heap, int N) static voidbinaryHeapToFile(double[] heap, int N, String filename) static voidbinaryHeapToFile(Object[] heap, int N) static voidbinaryHeapToFile(Object[] heap, int N, String filename) private static booleancanAppearUnquotedInLabel(char c) private static Stringprivate static Stringprivate static StringgetId(int i) private static Stringprivate static StringgetLabel(double d) private static StringgetLabel(float f) private static StringgetLabel(int i) private static Stringprivate static Stringprivate static PrintWritergetPrintWriter(File file) private static StringgetProperties(String label, String properties) static voidprivate static booleanstatic voidnodesToFile(Object root) Shows simple recursive data structures.static voidnodesToFile(Object root, String filename) private static voidnodesToFile(Object root, String properties, boolean withLabeledEdges) static voidnodesToFile(Object root, String filename, String properties, boolean withLabeledEdges) protected static Stringstatic voidsetBaseDirName(String baseDirName) Graphics files are saved in directory baseDirName/Graphviz.private static voidvoidvoidprivate voidtoFile(GraphvizBuilder.Type type, boolean keepGvFile, String filename, String properties) voidtoFileUndirected(String filename) voidtoFileUndirected(String filename, String properties) static voidufToFile(int[] uf) static voidprivate static StringUnescapes 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
-