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
@Deprecated
public abstract class AbstractDiagramLayouter
extends Object
implements DiagramLayouter, Cloneable
Deprecated.
Abstract diagram layouter contains post-processing, preprocessing and other important methods for
layouting diagrams.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractDiagramLayouter(String optionId) Deprecated, for removal: This API element is subject to removal in a future version.protectedAbstractDiagramLayouter(String optionId, boolean supportsSubgraph) Deprecated, for removal: This API element is subject to removal in a future version.supportsSubgraph has no effectprotectedAbstractDiagramLayouter(String optionId, boolean nodes, boolean paths) Deprecated, for removal: This API element is subject to removal in a future version.protectedAbstractDiagramLayouter(String optionId, boolean nodes, boolean paths, boolean supportsSubgraph) Deprecated, for removal: This API element is subject to removal in a future version.supportsSubgraph has no effect -
Method Summary
Modifier and TypeMethodDescriptionvoidafterLayout(AbstractDiagramLayouterOptionsGroup optionsGroup, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated.protected voidafterLayout(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, BaseGraph graph, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.booleanDeprecated.Checks is diagram can be layoutedprotected voidclearOldRectangles(BaseGraph graph) Deprecated.Clears old rectangles for shapes.clone()Deprecated.protected booleanDeprecated.Checks if selected elements have the same parent.protected voidcreateCommands(com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc, BaseGraph graph) Deprecated.Draws the graph shapes on diagram frameprotected BaseGraphcreateGraph(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup) Deprecated, for removal: This API element is subject to removal in a future version.will be removed without direct replacementprotected BaseGraphcreateGraph(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup, Set<PresentationElement> selected) Deprecated.createGraph(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup, Set<PresentationElement> selected, boolean initializeData) Deprecated.protected voidDeprecated.voiddrawLayoutResults(BaseGraph graph) Deprecated.Draws layout resultsDeprecated.com.dassault_systemes.modeler.magic.diagram.ylayout.DiagramLayouterAbortHandlerDeprecated.getLayoutParameter(String key) Deprecated.Deprecated, for removal: This API element is subject to removal in a future version.getSelected(AbstractDiagramPresentationElement diagramView) Deprecated.should not be used directly, select symbols usingPresentationElement.setSelected(List)booleanDeprecated, for removal: This API element is subject to removal in a future version.will no longer check anythingfinal booleanlayout(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated, for removal: This API element is subject to removal in a future version.useLayoutingclass for layouting a diagramprotected abstract booleanlayout(AbstractDiagramLayouterOptionsGroup opt, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated, for removal: This API element is subject to removal in a future version.useLayoutingclass for layouting a diagramfinal booleanlayoutGraph(AbstractDiagramLayouterOptionsGroup opt, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated.protected voidplaceLegendAndInfo(AbstractDiagramPresentationElement diagram, BaseGraph graph) Deprecated.Places diagram legends and infos.protected voidpostprocessing(BaseGraph graph, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.Does some post-processing after layout.protected voidpreProcessing(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.protected voidresizeOuterBoundaryIfNecessary(AbstractDiagramPresentationElement dpe, BaseGraph graph, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.Resizes outer bondary according to graphvoidsetAnchoredPresentationElement(PresentationElement shape, boolean makePreferred) Deprecated.Sets a shape element that should be anchored to, and saves the set preferred option, so that it can be restored after layout.protected voidDeprecated.protected voidsetLabelConsiderationMode(AbstractDiagramLayouterOptionsGroup optionsGroup, BaseGraph graph) Deprecated.voidsetLayoutParameter(String key, Object value) Deprecated.The need to reset the values back must be taken into consideration if a layouter is reused in few places
-
Field Details
-
layoutParameters
Deprecated.
-
-
Constructor Details
-
AbstractDiagramLayouter
@OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) protected AbstractDiagramLayouter(String optionId, boolean nodes, boolean paths) Deprecated, for removal: This API element is subject to removal in a future version.Constructor- Parameters:
optionId- layouter options idnodes- true if should layout nodespaths- true if should layout edges
-
AbstractDiagramLayouter
@OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) protected AbstractDiagramLayouter(String optionId, boolean nodes, boolean paths, boolean supportsSubgraph) Deprecated, for removal: This API element is subject to removal in a future version.supportsSubgraph has no effect -
AbstractDiagramLayouter
@OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) protected AbstractDiagramLayouter(String optionId) Deprecated, for removal: This API element is subject to removal in a future version.Constructor- Parameters:
optionId- layouter options id
-
AbstractDiagramLayouter
@OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) protected AbstractDiagramLayouter(String optionId, boolean supportsSubgraph) Deprecated, for removal: This API element is subject to removal in a future version.supportsSubgraph has no effect- Parameters:
optionId- layouter options id
-
-
Method Details
-
layout
@Deprecated(since="2024x Refresh3", forRemoval=true) public final boolean layout(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, @CheckForNull com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated, for removal: This API element is subject to removal in a future version.useLayoutingclass for layouting a diagramDescription copied from interface:DiagramLayouterLayouts diagram.- Specified by:
layoutin interfaceDiagramLayouter- Parameters:
options- defined layouter optionsdpe- diagrammc- macro command to add layouting to- Returns:
- true if layout was a success, false otherwise
-
setDefaultLayoutParameters
protected void setDefaultLayoutParameters()Deprecated. -
clearOldRectangles
Deprecated.Clears old rectangles for shapes. The old rectangle is used for link placement in movePath, MoveManager.- Parameters:
graph- layouted graph
-
createGraph
@CheckForNull @OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) protected BaseGraph createGraph(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup) Deprecated, for removal: This API element is subject to removal in a future version.will be removed without direct replacementConstructs a graph for layout- Parameters:
dpe- shapes and edges are taken from this diagramoptionsGroup- layouter options- Returns:
- a created graph
-
createGraph
@CheckForNull protected BaseGraph createGraph(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup, Set<PresentationElement> selected) Deprecated. -
createGraph
@CheckForNull public BaseGraph createGraph(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup, Set<PresentationElement> selected, boolean initializeData) Deprecated. -
setLabelConsiderationMode
protected void setLabelConsiderationMode(AbstractDiagramLayouterOptionsGroup optionsGroup, BaseGraph graph) Deprecated. -
containsSelectedFromTheSameParent
Deprecated.Checks if selected elements have the same parent. if nothing is selected return true -
createCommands
protected void createCommands(@CheckForNull com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc, BaseGraph graph) Deprecated.Draws the graph shapes on diagram frame- Parameters:
mc- macro command to store commands ingraph- this graph will be taken as data for elements
-
placeLegendAndInfo
Deprecated.Places diagram legends and infos.- Parameters:
diagram- diagram
-
postprocessing
protected void postprocessing(BaseGraph graph, @CheckForNull com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.Does some post-processing after layout. Moves the graph, layouts swimlanes.- Parameters:
graph- the graph data for post-processing
-
getSelected
@OpenApi @Deprecated(since="2024x Refresh3") public Set<PresentationElement> getSelected(AbstractDiagramPresentationElement diagramView) Deprecated.should not be used directly, select symbols usingPresentationElement.setSelected(List)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.
-
afterLayout
protected void afterLayout(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, BaseGraph graph, @CheckForNull com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated. -
preProcessing
protected void preProcessing(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, @CheckForNull com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated. -
layout
@OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) protected abstract boolean layout(AbstractDiagramLayouterOptionsGroup opt, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated, for removal: This API element is subject to removal in a future version.useLayoutingclass for layouting a diagramLayouts a diagram- Parameters:
opt- layouter optionsdpe- diagram to layoutgraph- a constructed graph from the diagram- Returns:
- true if it was layouted successfully , false otherwise.
-
layoutGraph
public final boolean layoutGraph(AbstractDiagramLayouterOptionsGroup opt, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated. -
canLayout
Deprecated.Description copied from interface:DiagramLayouterChecks is diagram can be layouted- Specified by:
canLayoutin interfaceDiagramLayouter- Parameters:
dpe- diagram to layout- Returns:
- true if it can be layouted, false otherwise
-
resizeOuterBoundaryIfNecessary
protected void resizeOuterBoundaryIfNecessary(AbstractDiagramPresentationElement dpe, BaseGraph graph, @CheckForNull com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.Resizes outer bondary according to graph- Parameters:
dpe- diagrammc- macro command
-
isTypeSupported
@OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) public boolean isTypeSupported(AbstractDiagramType type) Deprecated, for removal: This API element is subject to removal in a future version.will no longer check anythingTest the given type is supported.- Parameters:
type- The given type.- Returns:
- true, if diagram type is supported
-
dispose
Deprecated. -
drawLayoutResults
Deprecated.Description copied from interface:DiagramLayouterDraws layout results- Specified by:
drawLayoutResultsin interfaceDiagramLayouter- Parameters:
graph- current graph that is layouted
-
getOptionsID
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getOptionsIDin interfaceDiagramLayouter- Returns:
- options ID
-
setAnchoredPresentationElement
Deprecated.Sets a shape element that should be anchored to, and saves the set preferred option, so that it can be restored after layout.- Parameters:
shape- the shape that should be anchored while layouting.makePreferred- sets make preferred size option. For related elements should be set to false.
-
getAnchoredPresentationElement
Deprecated.- Returns:
- the shape that should be anchored and not moved anywhere after layout. Returns null if shape was not set.
-
getDiagramLayouterAbortHandler
public com.dassault_systemes.modeler.magic.diagram.ylayout.DiagramLayouterAbortHandler getDiagramLayouterAbortHandler()Deprecated. -
setLayoutParameter
Deprecated.The need to reset the values back must be taken into consideration if a layouter is reused in few places -
getLayoutParameter
Deprecated. -
clone
Deprecated. -
afterLayout
public void afterLayout(AbstractDiagramLayouterOptionsGroup optionsGroup, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated.
-
Layoutingclass for layouting a diagram