C

LayoutGraphHider

Provides functionality to temporarily hide and unhide nodes and edges of a graph.
Inheritance Hierarchy

Remarks

Hiding and unhiding graph elements is often useful during algorithmic operations where specific elements should be ignored.

This class allows hiding and restoring nodes and edges in a LayoutGraph without permanently removing them. The hidden elements are tracked, so they can be selectively restored when required. This can be especially useful in graph algorithms that need to work on a subgraph.

See Also

Developer's Guide

Members

No filters for this type

Constructors

Initializes a new instance of the LayoutGraphHider class for the specified graph.

Parameters

graph: LayoutGraph
The LayoutGraph to operate on. All non-static hiding and unhiding methods will modify this graph.

Throws

Exception ({ name: 'ArgumentError' })
Thrown if the graph parameter is null.

Properties

Gets the collection of edges that are currently hidden.
readonlyfinal

Property Value

An IEnumerable<Edge> representing the currently hidden edges.
Gets the collection of nodes that are currently hidden.
readonlyfinal

Property Value

An IEnumerable<Node> representing the currently hidden nodes.

Methods

Hides the specified node and all its adjacent edges.
The specified node and all edges connected to it will be hidden and stored for later restoration.
final

Parameters

node: LayoutNode
The LayoutNode to be hidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the node parameter is null.
Hides the specified edge.
The specified edge will be hidden and stored for later restoration.
final

Parameters

edge: LayoutEdge
The LayoutEdge to be hidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the edge parameter is null.
Hides all nodes and edges in the graph.
This method hides every node and edge in the graph and stores them for later restoration, e.g. using the unhideAll method.
final
Hides the specified collection of edges.
All edges in the collection will be hidden and stored for later restoration.
final

Parameters

edges: IEnumerable<LayoutEdge>
A collection of LayoutEdge objects to be hidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the edges parameter is null.
Hides the specified collection of nodes and their adjacent edges.
All specified nodes and their adjacent edges will be hidden and stored for later restoration.
final

Parameters

nodes: IEnumerable<LayoutNode>
A collection of LayoutNode objects to be hidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the nodes parameter is null.
Hides all graph elements except the specified nodes and optionally their adjacent edges.
All nodes and edges in the graph will be hidden except the specified nodes and, if requested, the edges between them.
final

Parameters

nodes: IEnumerable<LayoutNode>
A collection of LayoutNode objects to remain visible.
showAdjacentEdges?: boolean
If true, edges between the specified nodes will remain visible.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the nodes parameter is null.
Unhides the specified edge.
The specified edge will be restored. Ensure that both endpoints of the edge are visible before calling this method.
final

Parameters

edge: LayoutEdge
The LayoutEdge to be unhidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the edge parameter is null.
Unhides the specified node and optionally its adjacent edges.
The specified node and, if requested, its adjacent edges will be restored.
final

Parameters

node: LayoutNode
The LayoutNode to be unhidden.
unhideAdjacentEdges?: boolean
If true, adjacent edges will also be unhidden if the other endpoint is visible.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the node parameter is null.
Unhides all previously hidden nodes and edges in the graph.
Restores the visibility of all graph elements hidden by the hideAll or other hide operations.
final
Unhides the specified collection of edges.
The specified edges will be restored. Ensure that both endpoints of each edge are visible before calling this method.
final

Parameters

edges: IEnumerable<LayoutEdge>
A collection of LayoutEdge objects to be unhidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the edges parameter is null.
Unhides the specified collection of nodes and optionally their adjacent edges.
The specified nodes and, if requested, their adjacent edges will be restored.
final

Parameters

nodes: IEnumerable<LayoutNode>
A collection of LayoutNode objects to be unhidden.
unhideAdjacentEdges?: boolean
If true, adjacent edges will also be unhidden if the other endpoint is visible.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the nodes parameter is null.