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
ConstructorsModifierConstructorDescriptionprotected
AbstractDiagramLayouter
(String optionId) Deprecated, for removal: This API element is subject to removal in a future version.protected
AbstractDiagramLayouter
(String optionId, boolean supportsSubgraph) Deprecated, for removal: This API element is subject to removal in a future version.supportsSubgraph has no effectprotected
AbstractDiagramLayouter
(String optionId, boolean nodes, boolean paths) Deprecated, for removal: This API element is subject to removal in a future version.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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterLayout
(AbstractDiagramLayouterOptionsGroup optionsGroup, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated.protected void
afterLayout
(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, BaseGraph graph, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.boolean
Deprecated.Checks is diagram can be layoutedprotected void
clearOldRectangles
(BaseGraph graph) Deprecated.Clears old rectangles for shapes.clone()
Deprecated.protected boolean
Deprecated.Checks if selected elements have the same parent.protected void
createCommands
(com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc, BaseGraph graph) Deprecated.Draws the graph shapes on diagram frameprotected 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 replacementprotected BaseGraph
createGraph
(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup, Set<PresentationElement> selected) Deprecated.createGraph
(AbstractDiagramPresentationElement dpe, AbstractDiagramLayouterOptionsGroup optionsGroup, Set<PresentationElement> selected, boolean initializeData) Deprecated.protected void
Deprecated.void
drawLayoutResults
(BaseGraph graph) Deprecated.Draws layout resultsDeprecated.com.dassault_systemes.modeler.magic.diagram.ylayout.DiagramLayouterAbortHandler
Deprecated.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)
boolean
Deprecated, for removal: This API element is subject to removal in a future version.will no longer check anythingfinal boolean
layout
(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.useLayouting
class for layouting a diagramprotected abstract boolean
layout
(AbstractDiagramLayouterOptionsGroup opt, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated, for removal: This API element is subject to removal in a future version.useLayouting
class for layouting a diagramfinal boolean
layoutGraph
(AbstractDiagramLayouterOptionsGroup opt, AbstractDiagramPresentationElement dpe, BaseGraph graph) Deprecated.protected void
placeLegendAndInfo
(AbstractDiagramPresentationElement diagram, BaseGraph graph) Deprecated.Places diagram legends and infos.protected void
postprocessing
(BaseGraph graph, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.Does some post-processing after layout.protected void
preProcessing
(AbstractDiagramLayouterOptionsGroup options, AbstractDiagramPresentationElement dpe, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.protected void
resizeOuterBoundaryIfNecessary
(AbstractDiagramPresentationElement dpe, BaseGraph graph, com.dassault_systemes.modeler.foundation.editing.CompositeCommand mc) Deprecated.Resizes outer bondary according to graphvoid
setAnchoredPresentationElement
(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 void
Deprecated.protected void
setLabelConsiderationMode
(AbstractDiagramLayouterOptionsGroup optionsGroup, BaseGraph graph) Deprecated.void
setLayoutParameter
(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.useLayouting
class for layouting a diagramDescription copied from interface:DiagramLayouter
Layouts diagram.- Specified by:
layout
in 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.useLayouting
class 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:DiagramLayouter
Checks is diagram can be layouted- Specified by:
canLayout
in 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:DiagramLayouter
Draws layout results- Specified by:
drawLayoutResults
in 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:
getOptionsID
in 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.
-
Layouting
class for layouting a diagram