Class AbstractDiagramLayouter
- java.lang.Object
-
- com.nomagic.magicdraw.uml.symbols.layout.AbstractDiagramLayouter
-
- All Implemented Interfaces:
DiagramLayouter
,java.lang.Cloneable
- Direct Known Subclasses:
AbstractLinkDiagramLayouter
,CircularDiagramLayouter
,HierarchicDiagramLayouter
,OrganicDiagramLayouter
,OrthogonalDiagramLayouter
,TreeDiagramLayouter
@OpenApi public abstract class AbstractDiagramLayouter extends java.lang.Object implements DiagramLayouter, java.lang.Cloneable
Abstract diagram layouter contains post processing, preprocessing and other important methods for layouting diagrams.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDiagramLayouter(java.lang.String optionId)
Constructorprotected
AbstractDiagramLayouter(java.lang.String optionId, boolean supportsSubgraph)
Deprecated.supportsSubgraph has no effectprotected
AbstractDiagramLayouter(java.lang.String optionId, boolean nodes, boolean paths)
Constructorprotected
AbstractDiagramLayouter(java.lang.String optionId, boolean nodes, boolean paths, boolean supportsSubgraph)
Deprecated.supportsSubgraph has no effect
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected UMLGraph
createGraph(DiagramPresentationElement dpe, boolean useIntegratedLabels)
protected UMLGraph
createGraph(DiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup)
Constructs a graph for layoutprotected java.util.Set<PresentationElement>
getSelected(DiagramPresentationElement diagramView)
Collects a set of selected layoutable presentation elements in a diagramboolean
isTypeSupported(DiagramType type)
Test the given type is supported.protected abstract boolean
layout(AbstractDiagramLayouterOptionsGroup opt, DiagramPresentationElement dpe, UMLGraph graph)
Layouts a diagram
-
-
-
Constructor Detail
-
AbstractDiagramLayouter
@OpenApi protected AbstractDiagramLayouter(java.lang.String optionId, boolean nodes, boolean paths)
Constructor- Parameters:
optionId
- layouter options idnodes
- true if should layout nodespaths
- true if should layout edges
-
AbstractDiagramLayouter
@OpenApi @Deprecated protected AbstractDiagramLayouter(java.lang.String optionId, boolean nodes, boolean paths, boolean supportsSubgraph)
Deprecated.supportsSubgraph has no effect
-
AbstractDiagramLayouter
@OpenApi protected AbstractDiagramLayouter(java.lang.String optionId)
Constructor- Parameters:
optionId
- layouter options id
-
AbstractDiagramLayouter
@OpenApi @Deprecated protected AbstractDiagramLayouter(java.lang.String optionId, boolean supportsSubgraph)
Deprecated.supportsSubgraph has no effect- Parameters:
optionId
- layouter options id
-
-
Method Detail
-
createGraph
@OpenApi @Deprecated protected UMLGraph createGraph(DiagramPresentationElement dpe, boolean useIntegratedLabels)
Constructs a graph for layout- Parameters:
dpe
- shapes and edges are taken from this diagram- Returns:
- a created UMLGraph
-
createGraph
@OpenApi protected UMLGraph createGraph(DiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup)
Constructs a graph for layout- Parameters:
dpe
- shapes and edges are taken from this diagramoptionsGroup
- layouter options- Returns:
- a created UMLGraph
-
getSelected
@OpenApi protected java.util.Set<PresentationElement> getSelected(DiagramPresentationElement 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, DiagramPresentationElement dpe, UMLGraph graph)
Layouts a diagram- Parameters:
opt
- layouter optionsdpe
- diagram to layoutgraph
- a constructed graph from the diagram- Returns:
- true if it was layouted successfully , false otherwise.
-
isTypeSupported
@OpenApi public boolean isTypeSupported(DiagramType type)
Test the given type is supported.- Parameters:
type
- The given type.- Returns:
- true, if diagram type is supported
-
-