IDiagramLayout
This interface specifies the methods and properties that the LayoutManager of the Diagram uses to perform the positioning and routing of all of the nodes and links in the diagram.
Properties
public Diagram Diagram { get; set; }
value = iDiagramLayout.Diagram
iDiagramLayout.Diagram = value
Gets or sets a reference to the owner Diagram.
public Group Group { get; set; }
value = iDiagramLayout.Group
iDiagramLayout.Group = value
Gets or sets a reference to the owner Group, if any.
public string Id { get; set; }
value = iDiagramLayout.Id
iDiagramLayout.Id = value
Gets or sets an identifier for a particular layout.
public bool ValidLayout { get; set; }
value = iDiagramLayout.ValidLayout
iDiagramLayout.ValidLayout = value
Gets or sets whether this layout is valid; if not, the LayoutManager will call Link}) sometime in order to try to make the layout valid.
Methods
public bool CanLayoutPart(Part part)
result = iDiagramLayout.CanLayoutPart(part)
Decide whether a given Part should participate in this layout.
- part
Returns: Typically this should return false if the part is not visible, if the part is in a temporary Layer, or if the part's LayoutId is "None". This should return true if the part's LayoutId is "All" or if it matches the Id of this layout.
public void DoLayout(IEnumerable<Node> nodes, IEnumerable<Link> links)
iDiagramLayout.DoLayout(nodes, links)
Actually perform the layout computations--positioning the nodes and routing the links.
- nodes
- the Nodes to operate on
- links
- the Links to operate on
public void Invalidate(LayoutChange reason, Part part)
iDiagramLayout.Invalidate(reason, part)
Declare that this layout might no longer be valid, depending on the reason for the change.
- reason
- a LayoutChange hint describing what change may have made the layout invalid
- part
- an optional Part that has changed