Package jline.io.tikz

Class SequenceDiagramExporter

java.lang.Object
jline.io.tikz.SequenceDiagramExporter

public class SequenceDiagramExporter extends Object
Exports a LayeredNetwork model as a UML sequence diagram using TikZ/pgf-umlsd. Generates LaTeX code that can be compiled to PDF.
  • Constructor Details

    • SequenceDiagramExporter

      public SequenceDiagramExporter(LayeredNetwork model)
      Creates a sequence diagram exporter with default options.
    • SequenceDiagramExporter

      public SequenceDiagramExporter(LayeredNetwork model, SequenceDiagramOptions options)
      Creates a sequence diagram exporter with custom options.
  • Method Details

    • generateSequenceDiagram

      public String generateSequenceDiagram()
      Generates the complete LaTeX document with UML sequence diagram.
      Returns:
      Complete LaTeX document as a string
    • exportToFile

      public void exportToFile(String filePath) throws IOException
      Exports the sequence diagram to a .tex file.
      Parameters:
      filePath - Path to the output .tex file
      Throws:
      IOException
    • exportToPDF

      public File exportToPDF() throws IOException
      Compiles the sequence diagram to PDF using pdflatex.
      Returns:
      The generated PDF file
      Throws:
      IOException - If file operations fail
      RuntimeException - If pdflatex fails
    • exportToPNG

      public void exportToPNG(String filePath, int dpi) throws IOException
      Exports the sequence diagram to a PNG file.
      Parameters:
      filePath - Path to the output .png file
      dpi - Resolution in dots per inch
      Throws:
      IOException
    • exportToPNG

      public void exportToPNG(String filePath) throws IOException
      Exports the sequence diagram to a PNG file with default 150 DPI.
      Throws:
      IOException
    • display

      public void display()
      Displays the sequence diagram in a PDF viewer.
    • getOptions

      public SequenceDiagramOptions getOptions()
      Gets the options used by this exporter.