C

LayoutGraphHider
expert

Provides functionality to temporarily hide and unhide nodes, edges and labels 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, edges and labels 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 the specified edge label.
The specified edge label will be hidden and stored for later restoration.
final

Parameters

edgeLabel: LayoutEdgeLabel
The LayoutEdgeLabel to be hidden.

Throws

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

Parameters

nodeLabel: LayoutNodeLabel
The LayoutNodeLabel to be hidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the nodeLabel 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 edge labels.
All edge labels in the collection will be hidden and stored for later restoration.
final

Parameters

edgeLabels: IEnumerable<LayoutEdgeLabel>
conversion
A collection of LayoutEdgeLabel objects to be hidden.

Throws

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

Parameters

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

Throws

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

Parameters

nodeLabels: IEnumerable<LayoutNodeLabel>
conversion
A collection of LayoutNodeLabel objects to be hidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the nodeLabels 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>
conversion
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>
conversion
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 edge label.
The specified edge label will be restored. Ensure that the owner of the edge label is visible before calling this method.
final

Parameters

edgeLabel: LayoutEdgeLabel
The LayoutEdgeLabel to be unhidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the edgeLabel parameter is null.
Unhides the specified node label.
The specified node label will be restored. Ensure that the owner of the node label is visible before calling this method.
final

Parameters

nodeLabel: LayoutNodeLabel
The LayoutNodeLabel to be unhidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the nodeLabel 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 edge labels.
The specified edge labels will be restored. Ensure that the owner edge of each edge label is visible before calling this method.
final

Parameters

edgeLabels: IEnumerable<LayoutEdgeLabel>
conversion
A collection of LayoutEdgeLabel objects to be unhidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the edgeLabels parameter is null.
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>
conversion
A collection of LayoutEdge objects to be unhidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the edges parameter is null.
Unhides the specified collection of node labels.
The specified node labels will be restored. Ensure that the owner node of each node label is visible before calling this method.
final

Parameters

nodeLabels: IEnumerable<LayoutNodeLabel>
conversion
A collection of LayoutNodeLabel objects to be unhidden.

Throws

Exception ({ name: 'ArgumentError' })
Thrown when the nodeLabels 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>
conversion
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.