Table of Contents

Class FishboneLayout

Namespace
Northwoods.Go.Layouts.Extensions
Assembly
FishboneWinForms.dll

FishboneLayout is a custom Layout derived from TreeLayout for creating "fishbone" diagrams. A fishbone diagram also requires a Link class that implements custom routing, FishboneLink.

public class FishboneLayout : TreeLayout
Inheritance
FishboneLayout
Inherited Members

Remarks

This only works for angle == 0 or angle == 180.

This layout assumes Links are automatically routed in the way needed by fishbone diagrams by using the FishboneLink class instead of Link.

Constructors

FishboneLayout()

Create a Fishbone layout.

public FishboneLayout()

Methods

AssignTreeVertexValues(TreeVertex)

Add a direction property to each vertex and modify LayerSpacing.

protected override void AssignTreeVertexValues(TreeVertex v)

Parameters

v TreeVertex

This override stops links from being committed since the work is handled by the FishboneLink class.

protected override void CommitLinks()

CommitNodes()

Commit the position of all nodes.

protected override void CommitNodes()

Remarks

This is called by CommitLayout(). Please read the Introduction page on Extensions for how to override methods and how to call this base method.

See Also

MakeNetwork(IEnumerable<Part>)

Create and initialize a TreeNetwork with the given nodes and links. This override creates dummy vertexes, when necessary, to allow for proper positioning within the fishbone.

public override TreeNetwork MakeNetwork(IEnumerable<Part> coll = null)

Parameters

coll IEnumerable<Part>

Returns

TreeNetwork

TreeNetwork

Shift(TreeVertex)

Shifts subtrees within the fishbone based on angle and node spacing.

public void Shift(TreeVertex v)

Parameters

v TreeVertex

ShiftAll(int, double, TreeVertex, TreeVertex)

Shifts a subtree.

public void ShiftAll(int direction, double absolute, TreeVertex root, TreeVertex v)

Parameters

direction int
absolute double
root TreeVertex
v TreeVertex