Class UMLGraphLayout

java.lang.Object
org.tquadrat.foundation.javadoc.umlgraph.UMLGraphLayout

@ClassVersion(sourceVersion="$Id: UMLGraphLayout.java 1165 2026-03-22 19:30:59Z tquadrat $") @API(status=INTERNAL, since="0.0.5") public final class UMLGraphLayout extends Object
This class is used to lay out the UML graph.
Author:
Thomas Thrien - thomas.thrien@tquadrat.org
Version:
$Id: UMLGraphLayout.java 1165 2026-03-22 19:30:59Z tquadrat $
Since:
0.0.5
  • Field Details

  • Constructor Details

    • UMLGraphLayout

      public UMLGraphLayout(UMLDocument document)
      Creates a new UMLGraphLayout object.
      Parameters:
      document - The UML document.
  • Method Details

    • addEndingConnector

      public final void addEndingConnector(TypeSymbol typeSymbol, UMLConnector connector)
      Adds a connector to the registry of connectors ending on the given type symbol.
      Parameters:
      typeSymbol - The symbol.
      connector - The connector.
    • addClippath

      public final String addClippath(double x, double y, double width, double height)
      Creates a clippath from the given coordinates and add that to the UML document.
      Parameters:
      x - The x coordinate of the upper left corner of the rectangle.
      y - The y coordinate of the upper left corner of the rectangle.
      width - The width of the rectangle.
      height - The height of the rectangle.
      Returns:
      The id for the clippath element.
    • addStartingConnector

      public final void addStartingConnector(TypeSymbol typeSymbol, UMLConnector connector)
      Adds a connector to the registry of connectors starting at the given type symbol.
      Parameters:
      typeSymbol - The class symbol.
      connector - The connector.
    • createConnector

      public final void createConnector(TypeSymbol parent, TypeSymbol child)
      Creates a connector for the given parent and child.
      Parameters:
      parent - The parent.
      child - The child.
    • distribute

      public final void distribute()
      Distribute the elements in the layout.
    • finishRow

      public final void finishRow(boolean atEnd)
      Call this method if all elements were added to the current row.
      Parameters:
      atEnd - true if the row should be added to the end, false if it should be added to the beginning of the row's list.
    • getDocument

      public final UMLDocument getDocument()
      Returns a reference to the UMLDocument this instance of layout was created with.
      Returns:
      The UML document.
    • getNoParentRow

      Returns a reference to the row that holds the class objects that does not have parents.
      Returns:
      The row for parent-less class objects.
    • newRow

      Creates a new row for the layout; it is not yet added.
      Returns:
      The new row.