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.
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.
Hides the specified edge label.
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
edgeLabelparameter isnull.
Hides the specified node label.
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
nodeLabelparameter 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 edge labels.
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
edgeLabelsparameter isnull.
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>conversion
- A collection of LayoutEdge objects to be hidden.
Throws
- Exception ({ name: 'ArgumentError' })
- Thrown when the
edgesparameter isnull.
Hides the specified collection of node labels.
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
nodeLabelsparameter 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>conversion
- 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>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
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 edge label.
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
edgeLabelparameter isnull.
Unhides the specified node label.
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
nodeLabelparameter 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 edge labels.
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
edgeLabelsparameter isnull.
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>conversion
- A collection of LayoutEdge objects to be unhidden.
Throws
- Exception ({ name: 'ArgumentError' })
- Thrown when the
edgesparameter isnull.
Unhides the specified collection of node labels.
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
nodeLabelsparameter 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>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
nodesparameter isnull.