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.
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
graphparameter isnull.
Properties
Methods
Hides the specified node and all its adjacent edges.
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
nodeparameter isnull.
Hides the specified edge.
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
edgeparameter isnull.
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.
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
edgesparameter isnull.
Hides the specified collection of nodes and their adjacent edges.
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
nodesparameter isnull.
Hides all graph elements except the specified nodes and optionally their adjacent edges.
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
nodesparameter isnull.
Unhides the specified edge.
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
edgeparameter isnull.
Unhides the specified node and optionally its adjacent edges.
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
nodeparameter isnull.
Restores the visibility of all graph elements hidden by the hideAll or other hide operations.
final
Unhides the specified collection of edges.
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
edgesparameter isnull.
Unhides the specified collection of nodes and optionally their adjacent edges.
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
nodesparameter isnull.