public final class DOT extends Object
Modifier and Type | Method and Description |
---|---|
static String[] |
buildDOTCommand(String format,
String... additionalOpts) |
static String[] |
buildRawDOTCommand(String... opts) |
static boolean |
checkUsable() |
static @Nullable DOTComponent |
createDOTComponent(Reader r)
Creates a
DOTComponent that displays the result of rendering a DOT description read from a Reader . |
static Writer |
createDotWriter(boolean modal)
Creates a Writer that can be used to write a DOT description to.
|
static void |
renderDOT(File dotFile,
boolean modal)
Renders a GraphVIZ description from a string and displays it in a Swing window.
|
static void |
renderDOT(Reader r,
boolean modal)
Renders a GraphVIZ description and displays it in a Swing window.
|
static void |
renderDOT(String dotText,
boolean modal)
Renders a GraphVIZ description from a string and displays it in a Swing window.
|
static void |
renderDOTExternal(File dotFile,
String format)
Renders a GraphVIZ description from a file, using an external program for displaying.
|
static void |
renderDOTExternal(Reader r,
String format)
Renders a GraphVIZ description, using an external program for displaying.
|
static void |
renderDOTExternal(String dotText,
String format)
Renders a GraphVIZ description from a string, using an external program for displaying.
|
static BufferedImage |
renderDOTImage(File dotFile)
Reads a DOT description from a file and returns the PNG rendering result as a
BufferedImage . |
static BufferedImage |
renderDOTImage(Reader dotReader)
Reads a DOT description from a reader and returns the PNG rendering result as a
BufferedImage . |
static BufferedImage |
renderDOTImage(String dotText)
Reads a DOT description from a string and returns the PNG rendering result as a
BufferedImage . |
static void |
runDOT(File dotFile,
String format,
File out)
Invokes the DOT utility on a file, producing an output file.
|
static InputStream |
runDOT(File dotFile,
String format,
String... additionalOpts)
Invokes the DOT utility on a file.
|
static void |
runDOT(Reader r,
String format,
File out)
Invokes the GraphVIZ DOT utility for rendering graphs, writing output to the specified file.
|
static InputStream |
runDOT(Reader r,
String format,
String... additionalOpts)
Invokes the GraphVIZ DOT utility for rendering graphs.
|
static void |
runDOT(String dotText,
String format,
File out)
Invokes the DOT utility on a string, producing an output file.
|
static InputStream |
runDOT(String dotText,
String format,
String... additionalOpts)
Invokes the DOT utility on a string.
|
static void |
setDotExe(String dotExe) |
public static void setDotExe(String dotExe)
public static boolean checkUsable()
public static InputStream runDOT(String dotText, String format, String... additionalOpts) throws IOException
runDOT(Reader, String, String...)
IOException
public static InputStream runDOT(Reader r, String format, String... additionalOpts) throws IOException
r
- the reader from which the GraphVIZ description is obtained.format
- the output format, as understood by the dot utility, e.g., png, ps, ...IOException
- if reading from the specified reader fails.public static InputStream runDOT(File dotFile, String format, String... additionalOpts) throws IOException
runDOT(Reader, String, String...)
.IOException
public static void runDOT(String dotText, String format, File out) throws IOException
runDOT(Reader,
String, File)
.IOException
public static void runDOT(Reader r, String format, File out) throws IOException
r
- the reader from which the GraphVIZ description is read.format
- the output format to produce.out
- the file to which the output is written.IOException
- if an I/O error occurs reading from the given input or writing to the output file.public static void runDOT(File dotFile, String format, File out) throws IOException
runDOT(Reader,
String, File)
.IOException
public static void renderDOTExternal(String dotText, String format)
renderDOTExternal(Reader, String)
.public static void renderDOTExternal(Reader r, String format)
Desktop.open(File)
method.r
- the reader from which the GraphVIZ description is read.format
- the output format, as understood by the dot utility, e.g., png, ps, ...public static void renderDOTExternal(File dotFile, String format) throws IOException
renderDOTExternal(Reader, String)
.IOException
- if opening the file resulted in errors.public static void renderDOT(File dotFile, boolean modal) throws IOException
renderDOT(Reader, boolean)
.FileNotFoundException
- if opening the file resulted in errors.IOException
public static void renderDOT(Reader r, boolean modal)
r
- the reader from which the description is obtained.modal
- whether or not the dialog should be modal.public static void renderDOT(String dotText, boolean modal)
renderDOT(Reader, boolean)
.public static @Nullable DOTComponent createDOTComponent(Reader r)
DOTComponent
that displays the result of rendering a DOT description read from a Reader
.r
- the reader to read frompublic static BufferedImage renderDOTImage(String dotText) throws IOException
BufferedImage
.dotText
- the DOT descriptionIOException
- if the pipe to the DOT process breaks.public static BufferedImage renderDOTImage(Reader dotReader) throws IOException
BufferedImage
.dotReader
- the reader from which to read the descriptionIOException
- if reading from the reader fails, or the pipe to the DOT process breaks.public static BufferedImage renderDOTImage(File dotFile) throws IOException
BufferedImage
.dotFile
- the file containing the DOT descriptionIOException
- if reading from the file fails or the pipe to the DOT process breaks.public static Writer createDotWriter(boolean modal)
modal
- whether or not this window is modal (if set to true
, calls to Writer.close()
will
block.Copyright © 2020. All rights reserved.