Class AbstractDiagramLayouter

java.lang.Object
com.nomagic.magicdraw.uml.symbols.layout.AbstractDiagramLayouter
All Implemented Interfaces:
DiagramLayouter, Cloneable
Direct Known Subclasses:
AbstractHierarchicDiagramLayouter, AbstractLinkDiagramLayouter, CircularDiagramLayouter, GridDiagramLayouter, OrganicDiagramLayouter, OrthogonalDiagramLayouter, TreeDiagramLayouter

@OpenApi public abstract class AbstractDiagramLayouter extends Object implements DiagramLayouter, Cloneable
Abstract diagram layouter contains post processing, preprocessing and other important methods for layouting diagrams.
  • Constructor Details

    • AbstractDiagramLayouter

      @OpenApi protected AbstractDiagramLayouter(String optionId, boolean nodes, boolean paths)
      Constructor
      Parameters:
      optionId - layouter options id
      nodes - true if should layout nodes
      paths - true if should layout edges
    • AbstractDiagramLayouter

      @OpenApi @Deprecated protected AbstractDiagramLayouter(String optionId, boolean nodes, boolean paths, boolean supportsSubgraph)
      Deprecated.
      supportsSubgraph has no effect
    • AbstractDiagramLayouter

      @OpenApi protected AbstractDiagramLayouter(String optionId)
      Constructor
      Parameters:
      optionId - layouter options id
    • AbstractDiagramLayouter

      @OpenApi @Deprecated protected AbstractDiagramLayouter(String optionId, boolean supportsSubgraph)
      Deprecated.
      supportsSubgraph has no effect
      Parameters:
      optionId - layouter options id
  • Method Details

    • createGraph

      @CheckForNull @OpenApi protected BaseGraph createGraph(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup)
      Constructs a graph for layout
      Parameters:
      dpe - shapes and edges are taken from this diagram
      optionsGroup - layouter options
      Returns:
      a created graph
    • getSelected

      @OpenApi public Set<PresentationElement> getSelected(AbstractDiagramPresentationElement diagramView)
      Collects a set of selected layoutable presentation elements in a diagram
      Parameters:
      diagramView - the diagram that elements were selected in
      Returns:
      a set of selected layoutable presentation elements in a diagram. Empty if whole diagram is layouted.
    • layout

      @OpenApi protected abstract boolean layout(AbstractDiagramLayouterOptionsGroup opt, AbstractDiagramPresentationElement dpe, BaseGraph graph)
      Layouts a diagram
      Parameters:
      opt - layouter options
      dpe - diagram to layout
      graph - a constructed graph from the diagram
      Returns:
      true if it was layouted successfully , false otherwise.
    • isTypeSupported

      @OpenApi public boolean isTypeSupported(AbstractDiagramType type)
      Test the given type is supported.
      Parameters:
      type - The given type.
      Returns:
      true, if diagram type is supported