@OpenApiAll public class HierarchicDiagramLayouter extends AbstractDiagramLayouter
Modifier and Type | Class and Description |
---|---|
(package private) class |
HierarchicDiagramLayouter.PEXComparator
Comparator for sorting presentation elements by their x position.
|
Constructor and Description |
---|
HierarchicDiagramLayouter()
Construct HierarchicDiagramLayouter
|
HierarchicDiagramLayouter(java.lang.String optionId)
Construct HierarchicDiagramLayouter
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterLayout(AbstractDiagramLayouterOptionsGroup options,
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe,
UMLGraph graph,
com.nomagic.magicdraw.commands.MacroCommand mc) |
boolean |
canIntegrateLabels()
Determines if a layouter can integrate labels(change symbol positions in a graph) into layout
calculation
|
java.util.List<PathElement> |
collectOutgoingFromNonNode(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe) |
java.util.List<PathElement> |
collectPathsOneEndLayoutedOtherNot(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe,
UMLGraph umlGraph) |
protected java.util.Set<PathElement> |
findPathToRelayout(UMLGraph umlGraph,
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe) |
protected void |
fixOnFrameElements(UMLGraph graph,
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe,
HierarchicLayouterOptionsGroup o)
Fixes, moves, sorts overlapping shapes on diagram frame.
|
java.util.Vector<com.nomagic.magicdraw.uml.symbols.PresentationElement> |
getAllUnlayoutableSymbols(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe) |
protected y.layout.hierarchic.IncrementalHierarchicLayouter |
initDefaultHierarchicSettings(HierarchicLayouterOptionsGroup opt,
UMLGraph graph)
Initializes hierarchic layouter settings: - Enables backlooping - Sets group compaction
enabled - Aligns groups in center - Sets routing style to orthogonal - Adds group node insets
- Enables label layout - Sets the node sequence within layer.
|
protected boolean |
layout(AbstractDiagramLayouterOptionsGroup opt,
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe,
UMLGraph graph)
Layouts a diagram
|
protected void |
preProcessing(AbstractDiagramLayouterOptionsGroup options,
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe,
com.nomagic.magicdraw.commands.MacroCommand mc) |
protected void |
resizeOnEdgeElements(UMLGraph graph)
Resizes elements on edge to the minimal size.
|
protected void |
routeNonRoutedPaths(UMLGraph graph,
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe,
HierarchicLayouterOptionsGroup o,
com.nomagic.magicdraw.commands.MacroCommand mc,
java.util.Set<PathElement> pathToReroute)
Routes paths from unlayouted to layouted parts of diagram, from diagram frame, etc.
|
protected y.layout.grouping.RecursiveGroupLayouter |
wrapToAccordingGroupLayouter(UMLGraph graph,
y.layout.hierarchic.IncrementalHierarchicLayouter layouter) |
createGraph, getSelected, isSubgraphLayout, isTypeSupported, setSubgraphLayout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canLayout, drawLayoutResults, getOptionsID
public HierarchicDiagramLayouter()
public HierarchicDiagramLayouter(java.lang.String optionId)
optionId
- hierarchic diagram layouter options idprotected y.layout.hierarchic.IncrementalHierarchicLayouter initDefaultHierarchicSettings(HierarchicLayouterOptionsGroup opt, UMLGraph graph)
opt
- optionsgraph
- current graph that should be layoutedprotected y.layout.grouping.RecursiveGroupLayouter wrapToAccordingGroupLayouter(UMLGraph graph, y.layout.hierarchic.IncrementalHierarchicLayouter layouter)
protected boolean layout(AbstractDiagramLayouterOptionsGroup opt, com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe, UMLGraph graph)
AbstractDiagramLayouter
layout
in class AbstractDiagramLayouter
opt
- layouter optionsdpe
- diagram to layoutgraph
- a constructed graph from the diagramprotected void resizeOnEdgeElements(UMLGraph graph)
graph
- layouted graphprotected void preProcessing(AbstractDiagramLayouterOptionsGroup options, com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe, @CheckForNull com.nomagic.magicdraw.commands.MacroCommand mc)
preProcessing
in class AbstractDiagramLayouter
protected void afterLayout(AbstractDiagramLayouterOptionsGroup options, com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe, UMLGraph graph, com.nomagic.magicdraw.commands.MacroCommand mc)
afterLayout
in class AbstractDiagramLayouter
public boolean canIntegrateLabels()
AbstractDiagramLayouter
canIntegrateLabels
in class AbstractDiagramLayouter
protected void fixOnFrameElements(UMLGraph graph, com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe, HierarchicLayouterOptionsGroup o)
graph
- the graph that is layouteddpe
- diagramo
- options groupprotected void routeNonRoutedPaths(UMLGraph graph, com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe, @CheckForNull HierarchicLayouterOptionsGroup o, com.nomagic.magicdraw.commands.MacroCommand mc, java.util.Set<PathElement> pathToReroute)
graph
- the graph that is layouteddpe
- diagramo
- options groupmc
- macro command@Nonnull protected java.util.Set<PathElement> findPathToRelayout(UMLGraph umlGraph, com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe)
public java.util.List<PathElement> collectPathsOneEndLayoutedOtherNot(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe, UMLGraph umlGraph)
public java.util.List<PathElement> collectOutgoingFromNonNode(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe)
public java.util.Vector<com.nomagic.magicdraw.uml.symbols.PresentationElement> getAllUnlayoutableSymbols(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement dpe)