@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,
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(DiagramPresentationElement dpe) |
java.util.List<PathElement> |
collectPathsOneEndLayoutedOtherNot(DiagramPresentationElement dpe,
UMLGraph umlGraph) |
protected java.util.Set<PathElement> |
findPathToRelayout(UMLGraph umlGraph,
DiagramPresentationElement dpe) |
protected void |
fixOnFrameElements(UMLGraph graph,
DiagramPresentationElement dpe,
HierarchicLayouterOptionsGroup o)
Fixes, moves, sorts overlapping shapes on diagram frame.
|
java.util.List<PresentationElement> |
getAllUnlayoutableSymbols(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,
DiagramPresentationElement dpe,
UMLGraph graph)
Layouts a diagram
|
protected void |
preProcessing(AbstractDiagramLayouterOptionsGroup options,
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,
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, 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, DiagramPresentationElement dpe, @CheckForNull com.nomagic.magicdraw.commands.MacroCommand mc)
preProcessing
in class AbstractDiagramLayouter
protected void afterLayout(AbstractDiagramLayouterOptionsGroup options, 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, DiagramPresentationElement dpe, HierarchicLayouterOptionsGroup o)
graph
- the graph that is layouteddpe
- diagramo
- options groupprotected void routeNonRoutedPaths(UMLGraph graph, 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, DiagramPresentationElement dpe)
public java.util.List<PathElement> collectPathsOneEndLayoutedOtherNot(DiagramPresentationElement dpe, UMLGraph umlGraph)
public java.util.List<PathElement> collectOutgoingFromNonNode(DiagramPresentationElement dpe)
public java.util.List<PresentationElement> getAllUnlayoutableSymbols(DiagramPresentationElement dpe)