|
AddNode(TGGraphNode)
|
Adds the specified node to the graph. (Overrides GGraph.TGCustomGraph.AddNode(TGGraphNode).)
|
|
Clear
|
Clears the graph of all nodes and edges. (Overrides GGraph.TGCustomGraph.Clear.)
|
|
Extract(String)
|
Removes the node with the specified Caption from the graph without deleting it. The graph searches for a node that matches the Caption parameter, if no node is found this method returns nil.
Usually, deleting a node also frees the node. This method allows the node to be extracted without deleting it. You are responsible for freeing the extracted node. After extraction, the Graph property of the node is nil. To add the node back, set the Graph property.
The overloaded Extract method extracts the specified node. In other words, the graph doesn't have to search for a node that matches the Caption string.
Note
|
The extracted node's edges are deleted as a node cannot be connected to nodes in a graph and yet not be part of the graph.
|
|
|
Extract(TGGraphNode)
|
Removes the specified node from the graph without deleting it.
Usually, deleting a node also frees the node. This method allows the node to be extracted without deleting it. You are responsible for freeing the extracted node. After extraction, the Graph property of the node is nil. To add the node back, set the Graph property.
The overloaded Extract method extracts a node based on its Caption property. In other words, the graph searches for a node that matches the Caption string.
Note
|
The extracted node's edges are deleted as a node cannot be connected to nodes in a graph and yet not be part of the graph.
|
|
|
FindNode(String)
|
Searches the graph for a node that has its Caption property equal to the specified parameter. It returns the first node with this caption. If no node is found, the function returns nil. (Overrides GGraph.TGCustomGraph.FindNode(String).)
|
|
GetNodeCount
|
Returns the number of nodes in the graph (Overrides GGraph.TGCustomGraph.GetNodeCount.)
|
|
GetNodes
|
Returns an iterator over the entire graph. Call GetNodes to return an iterator from which you can access all the nodes in the graph. Every call to GetNodes returns a new iterator.
The GetNodes method provides a base class means of accessing all the nodes in the list. If you know the type of the descendant graph, you can use their access methods (such as the Node property of the TGGraph class).
Note
|
There is no ordering implied with the GetNodes function.
|
Warning
|
Do not use the enumeration to delete or add items to the graph as the behavior will be unpredictable (similar to a common TList programming error: for i := 0 to List.Count - 1 do; List.Delete(i); which only deletes every other item in the list).
|
|
|
RemoveNode(TGGraphNode)
|
Removes the node from the graph and frees the node.
All edges to and from the node are also deleted. The overloaded RemoveNode method removes a node based on its Caption property. In other words, the graph searches for a node that matches the Caption string.
Note
|
To remove a node without freeing it, use the Extract methods.
|
|
|
TextChange(TGGraphNode,String)
|
Called when a node's Caption is changing.
Calls the OnNodeCaptionChange event handler.
|