control-freak-ide/misc/pocs/GoJS/api/symbols/Node.html
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

2576 lines
148 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GoJS&reg; Node Class</title>
<script src="../../assets/js/jquery.min.js"></script>
<script src="../../assets/js/bootstrap.min.js"></script>
<script src="../../assets/js/highlight.js"></script>
<script src="../../assets/js/api.js"></script>
<link href="../../assets/css/bootstrap.min.css" rel="stylesheet" >
<!-- custom CSS after bootstrap -->
<link href="../../assets/css/main.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/css/api.css" rel="stylesheet" type="text/css"/>
<!--<link rel="stylesheet" href="../../assets/css/api.css" type="text/css" media="all" />-->
<link rel="stylesheet" href="../../assets/css/highlight.css" type="text/css" media="all" />
</head>
<body>
<!-- non-fixed navbar -->
<nav id="non-fixed-nav" class="navbar navbar-inverse navbar-top">
<div class="container-fluid">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#navbar">
<a id="toplogo" class="navbar-brand" href="../../index.html">GoJS</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="../../index.html">Home</a></li>
<li><a href="../../learn/index.html">Learn</a></li>
<li><a href="../../samples/index.html">Samples</a></li>
<li><a href="../../intro/index.html">Intro</a></li>
<li><a href="../../api/index.html">API</a></li>
<li><a href="https://www.nwoods.com/components/evalform.htm">Register</a></li>
<li><a href="../../doc/download.html">Download</a></li>
<li><a href="https://forum.nwoods.com/c/gojs">Forum</a></li>
<li><a href="https://www.nwoods.com/contact.html" onclick="ga('send','event','Outbound Link','click','contact');">Contact</a></li>
<li class="buy"><a href="https://www.nwoods.com/sales/index.html" onclick="ga('send','event','Outbound Link','click','buy');">Buy</a></li>
<li class="activate"><a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container-fluid">
<!-- ============================== classes index ============================ -->
<div id="navindex" class="col-md-2">
<!-- begin publish.classesIndex -->
<!-- <div><a href="../index.html">GoJS Class Index</a></div> -->
<div class="sidebar-nav">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#DiagramNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#DiagramNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Diagram Classes</span>
</div>
</div>
<div id="DiagramNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a></li>
<li><a href="../symbols/AnimationManager.html" class="linkConstructor">AnimationManager</a></li>
<li><a href="../symbols/CommandHandler.html" class="linkConstructor">CommandHandler</a></li>
<li><a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a></li>
<li><a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a></li>
<li><a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a></li>
<li><a href="../symbols/Group.html" class="linkConstructor">Group</a></li>
<li><a href="../symbols/InputEvent.html" class="linkConstructor">InputEvent</a></li>
<li><a href="../symbols/Layer.html" class="linkConstructor">Layer</a></li>
<li><a href="../symbols/Link.html" class="linkConstructor">Link</a></li>
<li><a href="../symbols/Node.html" class="linkConstructor">Node</a></li>
<li><a href="../symbols/Overview.html" class="linkConstructor">Overview</a></li>
<li><a href="../symbols/Palette.html" class="linkConstructor">Palette</a></li>
<li><a href="../symbols/Panel.html" class="linkConstructor">Panel</a></li>
<li><a href="../symbols/Part.html" class="linkConstructor">Part</a></li>
<li><a href="../symbols/Picture.html" class="linkConstructor">Picture</a></li>
<li><a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a></li>
<li><a href="../symbols/RowColumnDefinition.html" class="linkConstructor">RowColumnDefinition</a></li>
<li><a href="../symbols/Shape.html" class="linkConstructor">Shape</a></li>
<li><a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#GeometryNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#GeometryNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Geometry Classes</span>
</div>
</div>
<div id="GeometryNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Brush.html" class="linkConstructor">Brush</a></li>
<li><a href="../symbols/Geometry.html" class="linkConstructor">Geometry</a></li>
<li><a href="../symbols/Margin.html" class="linkConstructor">Margin</a></li>
<li><a href="../symbols/PathFigure.html" class="linkConstructor">PathFigure</a></li>
<li><a href="../symbols/PathSegment.html" class="linkConstructor">PathSegment</a></li>
<li><a href="../symbols/Point.html" class="linkConstructor">Point</a></li>
<li><a href="../symbols/Rect.html" class="linkConstructor">Rect</a></li>
<li><a href="../symbols/Size.html" class="linkConstructor">Size</a></li>
<li><a href="../symbols/Spot.html" class="linkConstructor">Spot</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ModelNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ModelNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Model Classes</span>
</div>
</div>
<div id="ModelNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Binding.html" class="linkConstructor">Binding</a></li>
<li><a href="../symbols/ChangedEvent.html" class="linkConstructor">ChangedEvent</a></li>
<li><a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a></li>
<li><a href="../symbols/Model.html" class="linkConstructor">Model</a></li>
<li><a href="../symbols/Transaction.html" class="linkConstructor">Transaction</a></li>
<li><a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a></li>
<li><a href="../symbols/UndoManager.html" class="linkConstructor">UndoManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#LayoutNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#LayoutNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Layout Classes</span>
</div>
</div>
<div id="LayoutNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/CircularLayout.html" class="linkConstructor">CircularLayout</a></li>
<li><a href="../symbols/ForceDirectedLayout.html" class="linkConstructor">ForceDirectedLayout</a></li>
<li><a href="../symbols/GridLayout.html" class="linkConstructor">GridLayout</a></li>
<li><a href="../symbols/LayeredDigraphLayout.html" class="linkConstructor">LayeredDigraphLayout</a></li>
<li><a href="../symbols/Layout.html" class="linkConstructor">Layout</a></li>
<li><a href="../symbols/LayoutNetwork.html" class="linkConstructor">LayoutNetwork</a></li>
<li><a href="../symbols/TreeLayout.html" class="linkConstructor">TreeLayout</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ToolNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ToolNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Tool Classes</span>
</div>
</div>
<div id="ToolNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/ActionTool.html" class="linkConstructor">ActionTool</a></li>
<li><a href="../symbols/ClickCreatingTool.html" class="linkConstructor">ClickCreatingTool</a></li>
<li><a href="../symbols/ClickSelectingTool.html" class="linkConstructor">ClickSelectingTool</a></li>
<li><a href="../symbols/ContextMenuTool.html" class="linkConstructor">ContextMenuTool</a></li>
<li><a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a></li>
<li><a href="../symbols/DragSelectingTool.html" class="linkConstructor">DragSelectingTool</a></li>
<li><a href="../symbols/HTMLInfo.html" class="linkConstructor">HTMLInfo</a></li>
<li><a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a></li>
<li><a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a></li>
<li><a href="../symbols/LinkReshapingTool.html" class="linkConstructor">LinkReshapingTool</a></li>
<li><a href="../symbols/PanningTool.html" class="linkConstructor">PanningTool</a></li>
<li><a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a></li>
<li><a href="../symbols/ResizingTool.html" class="linkConstructor">ResizingTool</a></li>
<li><a href="../symbols/RotatingTool.html" class="linkConstructor">RotatingTool</a></li>
<li><a href="../symbols/TextEditingTool.html" class="linkConstructor">TextEditingTool</a></li>
<li><a href="../symbols/Tool.html" class="linkConstructor">Tool</a></li>
<li><a href="../symbols/ToolManager.html" class="linkConstructor">ToolManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#CollectionNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#CollectionNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Collection Classes</span>
</div>
</div>
<div id="CollectionNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Iterable.html" class="linkConstructor">Iterable</a></li>
<li><a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a></li>
<li><a href="../symbols/List.html" class="linkConstructor">List</a></li>
<li><a href="../symbols/Map.html" class="linkConstructor">Map</a></li>
<li><a href="../symbols/Set.html" class="linkConstructor">Set</a></li>
</ul>
</div>
</div>
</div> <!-- /class="sidebar-nav -->
<!-- end publish.classesIndex -->
</div>
<div id="contentBody" class="col-md-10">
<!-- ============================== header ================================= -->
<div id="header" class="fineprint mt30">
<b>GoJS</b>&reg; Diagramming Components<br/>version 1.8.5 for JavaScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a>
</div>
<!-- ============================== class title ============================ -->
<h2 class="classTitle mt30">
Class Node
</h2>
<!-- ============================== class summary ========================== -->
<span class="hideshowall">
<span class="nodetails"><button id="buttonShow">Show Details</button></span>
<span class="details"><button id="buttonHide">Show Summaries</button></span>
</span>
<p class="classsummary">
<span class="extends"> Extends
<a href="../symbols/Part.html" class="linkConstructor">Part</a>.</span>
A Node is a <a href="../symbols/Part.html" class="linkConstructor">Part</a> that may connect to other nodes with <a href="../symbols/Link.html" class="linkConstructor">Link</a>s,
or that may be a member of a <a href="../symbols/Group.html" class="linkConstructor">Group</a>.
<p>
<a href="../symbols/Group.html" class="linkConstructor">Group</a> inherits from Node,
enabling nodes to logically contain other nodes and links.
<p class="boxread">
For a more general discussion of how to define nodes, see <a href="../../intro/nodes.html">Introduction to Nodes</a>.
<p>
Although you can create a Node and <a href="../symbols/Diagram.html#add" class="linkMethod">Diagram.add</a> it to a Diagram, this does not update the Model.
It is more common to create a node by adding a node data object to the model
by calling <a href="../symbols/Model.html#addNodeData" class="linkMethod">Model.addNodeData</a>. For example:
<pre>
myDiagram.startTransaction("make new node");
myDiagram.model.addNodeData({ key: "Omega" });
myDiagram.commitTransaction("make new node");
</pre>
<p>
This will cause a Node or simple <a href="../symbols/Part.html" class="linkConstructor">Part</a> to be created (copying the template found in <a href="../symbols/Diagram.html#nodeTemplateMap" class="linkProperty">Diagram.nodeTemplateMap</a>),
added to the Diagram in some <a href="../symbols/Layer.html" class="linkConstructor">Layer</a> (based on <a href="../symbols/Part.html#layerName" class="linkProperty">Part.layerName</a>), and bound to the node data
(resulting in <a href="../symbols/Panel.html#data" class="linkProperty">Panel.data</a> referring to that node data object).
If you do not keep a reference to that JavaScript object, as the above code does not,
you can retrieve it later by calling <a href="../symbols/Model.html#findNodeDataForKey" class="linkMethod">Model.findNodeDataForKey</a>.
<p>
It is very common to initialize a Diagram by setting <a href="../symbols/Model.html#nodeDataArray" class="linkProperty">Model.nodeDataArray</a> to a JavaScript Array
of JavaScript objects holding the properties that you need in your model.
Nearly all of the samples do this kind of initialization.
<p>
You can delete a Node by either calling <a href="../symbols/Diagram.html#remove" class="linkMethod">Diagram.remove</a> or by calling <a href="../symbols/Model.html#removeNodeData" class="linkMethod">Model.removeNodeData</a>.
The latter obviously will modify the Model; the former does so if the Node was created from model data.
Commands such as <a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">CommandHandler.deleteSelection</a> call these methods within a transaction.
<p>
You can find all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that are connected with a Node by calling <a href="../symbols/Node.html#findLinksConnected" class="linkMethod">findLinksConnected</a>.
Because links normally have a direction, you can find all of the links that have their <a href="../symbols/Link.html#toNode" class="linkProperty">Link.toNode</a>
be a given Node by calling <a href="../symbols/Node.html#findLinksInto" class="linkMethod">findLinksInto</a>.
Similarly, you can call <a href="../symbols/Node.html#findLinksOutOf" class="linkMethod">findLinksOutOf</a> to find all of the links coming out from a node;
such links have their <a href="../symbols/Link.html#fromNode" class="linkProperty">Link.fromNode</a> be that node.
For tree-structured graphs, use <a href="../symbols/Node.html#findTreeChildrenLinks" class="linkMethod">findTreeChildrenLinks</a> or <a href="../symbols/Node.html#findTreeParentLink" class="linkMethod">findTreeParentLink</a>.
<p>
If you are not so interested in the links but are interested in the nodes at the other end of the links
connecting with a node, there are other methods that you can call.
<a href="../symbols/Node.html#findNodesConnected" class="linkMethod">findNodesConnected</a> returns all of the nodes that are at the other end of the links that
connect with a given node.
<a href="../symbols/Node.html#findNodesInto" class="linkMethod">findNodesInto</a> and <a href="../symbols/Node.html#findNodesOutOf" class="linkMethod">findNodesOutOf</a> return the subsets of those nodes considering
only those links that go into or come out of the given node.
For tree-structured graphs, use <a href="../symbols/Node.html#findTreeChildrenNodes" class="linkMethod">findTreeChildrenNodes</a> or <a href="../symbols/Node.html#findTreeParentNode" class="linkMethod">findTreeParentNode</a>.
<p>
For example, to operate on the data of all of the destination nodes:
<pre>
var it = somenode.findNodesOutOf();
while (it.next()) {
var child = it.value;
if (child.data.text.indexOf("special") >= 0) { ... }
}
</pre>
<p>
You can link two nodes by creating a new <a href="../symbols/Link.html" class="linkConstructor">Link</a>, setting its <a href="../symbols/Link.html#toNode" class="linkProperty">Link.toNode</a> and <a href="../symbols/Link.html#fromNode" class="linkProperty">Link.fromNode</a>
(in either order), and <a href="../symbols/Diagram.html#add" class="linkMethod">Diagram.add</a>ing it to the diagram.
But it is more common to add a link data object to the <a href="../symbols/Diagram.html#model" class="linkProperty">Diagram.model</a> by calling <a href="../symbols/GraphLinksModel.html#addLinkData" class="linkMethod">GraphLinksModel.addLinkData</a>.
Just creating and adding a <a href="../symbols/Link.html" class="linkConstructor">Link</a> will not update the model.
<p>
Thus to add a link when using a <a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a> you should do something like:
<pre>
myDiagram.startTransaction("make new link");
myDiagram.model.addLinkData({ from: "Alpha", to: "Beta" });
myDiagram.commitTransaction("make new link");
</pre>
<p>
Where you would substitute the keys of the actual nodes that you want to connect with a link.
If you are using a <a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a>, there are no link data objects, so you just need to call
<a href="../symbols/TreeModel.html#setParentKeyForNodeData" class="linkMethod">TreeModel.setParentKeyForNodeData</a> to specify the "parent" node's key for a "child" node data.
<p>
To find a <a href="../symbols/Link.html" class="linkConstructor">Link</a> given a link data object in the <a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a>,
call <a href="../symbols/Diagram.html#findLinkForData" class="linkMethod">Diagram.findLinkForData</a>. When using a <a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a>, call either <a href="../symbols/Diagram.html#findNodeForData" class="linkMethod">Diagram.findNodeForData</a>
or <a href="../symbols/Diagram.html#findNodeForKey" class="linkMethod">Diagram.findNodeForKey</a> to get a Node, and then call <a href="../symbols/Node.html#findTreeParentLink" class="linkMethod">findTreeParentLink</a> to get the Link, if any exists.
<p>
To find a link that connects two nodes, call <a href="../symbols/Node.html#findLinksTo" class="linkMethod">findLinksTo</a> or <a href="../symbols/Node.html#findLinksBetween" class="linkMethod">findLinksBetween</a>.
With the former method, the direction matters; with the latter method it returns links in either direction.
<p>
As links connect with a node or are disconnected, you may want to update the appearance of the node.
You can set the <a href="../symbols/Node.html#linkConnected" class="linkProperty">linkConnected</a> and <a href="../symbols/Node.html#linkDisconnected" class="linkProperty">linkDisconnected</a> properties to be functions that are called.
These functions must not modify any link relationships -- the properties just exist to update the appearance of the node.
A typical usage would be to change the color or figure of a shape.
<p>
You can control whether the user may draw a new link or reconnect a link between a pair of Nodes
by affecting the result of <a href="../symbols/LinkingBaseTool.html#isValidLink" class="linkMethod">LinkingBaseTool.isValidLink</a>.
You can override that predicate on <a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a> and <a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a>,
but it is easier to set the <a href="../symbols/Node.html#linkValidation" class="linkProperty">linkValidation</a> or
<a href="../symbols/LinkingBaseTool.html#linkValidation" class="linkProperty">LinkingBaseTool.linkValidation</a> functional property.
<p class="boxread">
For a more general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.
<p>
Nodes also support the ability to provide logical and physical distinctions in the connection points
that links use at a node. These connection objects are called "ports".
By default the port object will be the whole <a href="../symbols/Node.html" class="linkConstructor">Node</a>.
However, you can set the <a href="../symbols/GraphObject.html#portId" class="linkProperty">GraphObject.portId</a> property on any <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a> in the visual tree of a node
to cause that element to be treated as a "port".
The "port id" is just a string that ought to be unique amongst all of the port elements in the node.
<p>
In the case of a node only having a single port, you should set the <a href="../symbols/GraphObject.html#portId" class="linkProperty">GraphObject.portId</a> as an empty string.
When there is no such element declared as the default port, it uses the whole node.
You can use the <a href="../symbols/Node.html#port" class="linkProperty">port</a> property to get the only port element.
<p>
When a node should have multiple ports,
i.e. multiple <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>s acting as separate connection points for links,
you should set each port's <a href="../symbols/GraphObject.html#portId" class="linkProperty">GraphObject.portId</a> to a string value that is unique for the node.
When there may be multiple ports on a node, you can get a collection of elements representing ports
by using the <a href="../symbols/Node.html#ports" class="linkProperty">ports</a> property.
Use the <a href="../symbols/Node.html#findPort" class="linkMethod">findPort</a> method to find a particular port element by name.
<p>
Note: the only kind of model that can save port information, i.e. portIds that are not an empty string,
for links is a <a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a> whose <a href="../symbols/GraphLinksModel.html#linkFromPortIdProperty" class="linkProperty">GraphLinksModel.linkFromPortIdProperty</a> and
<a href="../symbols/GraphLinksModel.html#linkToPortIdProperty" class="linkProperty">GraphLinksModel.linkToPortIdProperty</a> have been set to name properties on the link data objects.
<p class="boxread">
For a more general discussion of ports, see <a href="../../intro/ports.html">Introduction to Ports</a>.
<p>
All of the "findLinks..." and "findNodes..." methods mentioned above take an optional port id argument.
When no argument is passed, these methods consider all links connecting with the node.
When a port id argument is provided, these methods only consider links that connect with that port
in the given node.
Thus when navigating through the diagram, you can easily look at all of the nodes that links coming out of
a given node go to. Or you can just look at those nodes at the ends of links coming out of a particular port.
<p>
You can also control the default connecting behavior of <a href="../symbols/Link.html" class="linkConstructor">Link</a>s at each port.
Because a port can be any <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>, they are all properties on GraphObject.
The properties are duplicated so that you can guide the "from" ends of links differently from the "to" ends of links.
The properties include:
<ul>
<li><a href="../symbols/GraphObject.html#fromSpot" class="linkProperty">GraphObject.fromSpot</a>, <a href="../symbols/GraphObject.html#toSpot" class="linkProperty">GraphObject.toSpot</a></li>
<li><a href="../symbols/GraphObject.html#fromEndSegmentLength" class="linkProperty">GraphObject.fromEndSegmentLength</a>, <a href="../symbols/GraphObject.html#toEndSegmentLength" class="linkProperty">GraphObject.toEndSegmentLength</a></li>
<li><a href="../symbols/GraphObject.html#fromShortLength" class="linkProperty">GraphObject.fromShortLength</a>, <a href="../symbols/GraphObject.html#toShortLength" class="linkProperty">GraphObject.toShortLength</a></li>
<li><a href="../symbols/GraphObject.html#fromLinkable" class="linkProperty">GraphObject.fromLinkable</a>, <a href="../symbols/GraphObject.html#toLinkable" class="linkProperty">GraphObject.toLinkable</a></li>
<li><a href="../symbols/GraphObject.html#fromLinkableDuplicates" class="linkProperty">GraphObject.fromLinkableDuplicates</a>, <a href="../symbols/GraphObject.html#toLinkableDuplicates" class="linkProperty">GraphObject.toLinkableDuplicates</a></li>
<li><a href="../symbols/GraphObject.html#fromLinkableSelfNode" class="linkProperty">GraphObject.fromLinkableSelfNode</a>, <a href="../symbols/GraphObject.html#toLinkableSelfNode" class="linkProperty">GraphObject.toLinkableSelfNode</a></li>
<li><a href="../symbols/GraphObject.html#fromMaxLinks" class="linkProperty">GraphObject.fromMaxLinks</a>, <a href="../symbols/GraphObject.html#toMaxLinks" class="linkProperty">GraphObject.toMaxLinks</a></li>
</ul>
<p>
The "...Spot" and "...Length" and "...Direction" properties control the position and routing of links at a port.
The "...Linkable..." and "...MaxLinks" properties control whether or not users can draw a new link
or reconnect an existing link from or to a port.
(The "...Spot" and "...Length" and "...Direction" properties also exist on <a href="../symbols/Link.html" class="linkConstructor">Link</a>, to override for a particular
link the default values that come from a port element.)
<p class="boxread">
For a more general discussion of link points, see <a href="../../intro/connectionPoints.html">Introduction to Link Connection Points</a>.
<p>
When the graph is tree-structured, you can use several functions for traversing the tree:
<ul>
<li><a href="../symbols/Node.html#findTreeParentNode" class="linkMethod">findTreeParentNode</a></li>
<li><a href="../symbols/Node.html#findTreeChildrenNodes" class="linkMethod">findTreeChildrenNodes</a></li>
<li><a href="../symbols/Node.html#findTreeParentLink" class="linkMethod">findTreeParentLink</a></li>
<li><a href="../symbols/Node.html#findTreeChildrenLinks" class="linkMethod">findTreeChildrenLinks</a></li>
<li><a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
<li><a href="../symbols/Node.html#findTreeParts" class="linkMethod">findTreeParts</a></li>
<li><a href="../symbols/Node.html#findCommonTreeParent" class="linkMethod">findCommonTreeParent</a></li>
<li><a href="../symbols/Node.html#isInTreeOf" class="linkMethod">isInTreeOf</a></li>
<li><a href="../symbols/Node.html#findTreeLevel" class="linkMethod">findTreeLevel</a></li>
</ul>
<p>
Determining whether a tree grows from the root via links that go out to the children or vice-versa
is controlled for the whole diagram by the <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a> property.
However an individual link will be ignored by the above functions if <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false.
<p>
The Node class also supports the notion of expanding and collapsing a subtree of nodes and links,
causing those nodes and links to be shown or hidden.
Principally this is a matter of setting <a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">Node.isTreeExpanded</a>.
Of course if the diagram's graph is not tree-structured, these concepts and properties might not apply.
<p>
If you want to change the appearance of the node you can do so in a function that you assign to
the <a href="../symbols/Node.html#treeExpandedChanged" class="linkProperty">treeExpandedChanged</a> property.
This function must not modify any link relationships or expand or collapse any subtrees -- the property just exists
to update the appearance of the node.
<p>
There is an option for link routing to try to avoid crossing over nodes:
<a href="../symbols/Link.html#routing" class="linkProperty">Link.routing</a> = <a href="../symbols/Link.html#AvoidsNodes" class="linkConstant">Link.AvoidsNodes</a>.
You can control whether such links should avoid or ignore a node by setting <a href="../symbols/Node.html#avoidable" class="linkProperty">avoidable</a>.
Set <a href="../symbols/Node.html#avoidableMargin" class="linkProperty">avoidableMargin</a> to control the area beyond the <a href="../symbols/GraphObject.html#actualBounds" class="linkProperty">GraphObject.actualBounds</a>
where AvoidsNodes links should not go.
<p class="boxread">
For more discussion and examples, see <a href="../../intro/nodes.html">Nodes</a>,
<a href="../../intro/ports.html">Ports</a>, and
<a href="../../intro/connectionPoints.html">Link Points</a>.
<p class="boxread">
For more about trees, see <a href="../../intro/trees.html">Trees</a>, and
<a href="../../intro/subtrees.html">SubTrees</a>.
<p class="boxread">
To customize user-resizing behavior, please read
<a href="../../intro/tools.html#ResizingTool">Introduction to the ResizingTool</a>.
To customize user-rotating behavior, please read
<a href="../../intro/tools.html#RotatingTool">Introduction to the RotatingTool</a>.
<p>
Only Nodes that are in Diagrams can have connections via Links.
Templates should not be connected with Links, be labels of Links, be members of Groups, or have any Adornments.
</p>
<!-- ============================== constructor summary ==================== -->
<h2 id="constructor" class="summaryCaption"> Constructor <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the constructor documented in the class Node.">
<thead>
<tr>
<th scope="col" class="name">Name</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name" >
<div class="name">
Node(type)
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Constructs an empty Node.<span class="nodetails" id="xconNode"><a class="morelink" onclick="hst('conNode')">More...</a></span> <span class="details" id="conNode">
The panel type must be one of the values permitted by <a href="../symbols/Panel.html#type" class="linkProperty">Panel.type</a>.</span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{EnumValue=}</span> <b>type</b>
</dt>
<dd>if not supplied, the default Panel type is <a href="../symbols/Panel.html#Position" class="linkConstant">Panel.Position</a>.</dd>
</dl>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<!-- ============================== properties summary ===================== -->
<h2 class="summaryCaption">Properties<span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the properties documented in the class Node.">
<thead>
<tr>
<th scope="col" class="name">Name, Value Type</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="avoidable" >
<td class="name">
<div class="name">
avoidable
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether this Node is to be avoided by <a href="../symbols/Link.html" class="linkConstructor">Link</a>s
whose <a href="../symbols/Link.html#routing" class="linkProperty">Link.routing</a> is <a href="../symbols/Link.html#AvoidsNodes" class="linkConstant">Link.AvoidsNodes</a>.<span class="nodetails" id="xpropavoidable"><a class="morelink" onclick="hst('propavoidable')">More...</a></span> <span class="details" id="propavoidable">
</span><div class="details" id="dpropavoidable"><p>
The default value is true.</div>
</div>
</td>
</tr>
<tr id="avoidableMargin" >
<td class="name">
<div class="name">
avoidableMargin
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Margin.html" class="linkConstructor">Margin</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the margin around this Node in which avoidable links will not be routed.<span class="nodetails" id="xpropavoidableMargin"><a class="morelink" onclick="hst('propavoidableMargin')">More...</a></span> <span class="details" id="propavoidableMargin">
</span><div class="details" id="dpropavoidableMargin"><p>
You may need to increase the <a href="../symbols/GraphObject.html#fromEndSegmentLength" class="linkProperty">fromEndSegmentLength</a> and <a href="../symbols/GraphObject.html#toEndSegmentLength" class="linkProperty">toEndSegmentLength</a> in
order to prevent link routes from turning within the avoidable area around the Node.
<p>
Value must be of type Margin.
The default margin is Margin(2,2,2,2)</div>
</div>
</td>
</tr>
<tr id="isLinkLabel" >
<td class="name">
<div class="name">
isLinkLabel
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>This read-only property is true when this Node is a label node for a Link.<span class="nodetails" id="xpropisLinkLabel"><a class="morelink" onclick="hst('propisLinkLabel')">More...</a></span> <span class="details" id="propisLinkLabel">
</span><div class="details" id="dpropisLinkLabel"><p>
If this is true, then <code>n.labeledLink</code> will be a Link and <code>n.labeledLink.isLabeledLink</code> will be true.</div>
<div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#labeledLink" class="linkProperty">labeledLink</a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr id="isTreeExpanded" >
<td class="name">
<div class="name">
isTreeExpanded
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether the subtree graph starting at this node is expanded.<span class="nodetails" id="xpropisTreeExpanded"><a class="morelink" onclick="hst('propisTreeExpanded')">More...</a></span> <span class="details" id="propisTreeExpanded">
Changing this property's value will call <a href="../symbols/Node.html#collapseTree" class="linkMethod">collapseTree</a> or <a href="../symbols/Node.html#expandTree" class="linkMethod">expandTree</a>,
and also will call the value of <a href="../symbols/Node.html#treeExpandedChanged" class="linkProperty">treeExpandedChanged</a> if it is a function.
</span><div class="details" id="dpropisTreeExpanded"><p>
The initial value is true -- "tree-child" nodes, and the links to them, are shown.
<p>
There is an analogous property for expanded/collapsed <a href="../symbols/Group.html" class="linkConstructor">Group</a>s: <a href="../symbols/Group.html#isSubGraphExpanded" class="linkProperty">Group.isSubGraphExpanded</a>.</div>
</div>
</td>
</tr>
<tr id="isTreeLeaf" >
<td class="name">
<div class="name">
isTreeLeaf
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets whether this node has no tree children.<span class="nodetails" id="xpropisTreeLeaf"><a class="morelink" onclick="hst('propisTreeLeaf')">More...</a></span> <span class="details" id="propisTreeLeaf">
</span><div class="details" id="dpropisTreeLeaf"><p>
The initial value is true, meaning that there are no links connected with child nodes
in the direction given by <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a>.
This value changes automatically as link connections are added to or removed from this node.
Links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.</div>
</div>
</td>
</tr>
<tr id="labeledLink" >
<td class="name">
<div class="name">
labeledLink
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the <a href="../symbols/Link.html" class="linkConstructor">Link</a> for which this Node is acting as a smart label.<span class="nodetails" id="xproplabeledLink"><a class="morelink" onclick="hst('proplabeledLink')">More...</a></span> <span class="details" id="proplabeledLink">
Most nodes do not act as link labels, so this property will be null.
</span><div class="details" id="dproplabeledLink"><p>
A template should not be a label node for a link.</div>
<div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#isLinkLabel" class="linkProperty">isLinkLabel</a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr id="linkConnected" >
<td class="name">
<div class="name">
linkConnected
</div>
<div class="attributes">
<span class="light">{function(Node, Link, GraphObject) | null}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the function that is called after a <a href="../symbols/Link.html" class="linkConstructor">Link</a> has been connected with this Node.<span class="nodetails" id="xproplinkConnected"><a class="morelink" onclick="hst('proplinkConnected')">More...</a></span> <span class="details" id="proplinkConnected">
It is typically used to modify the appearance of the node.
The first argument will be this Node.
The second argument will be a Link that is now connected with this node.
The third argument will be a GraphObject port indicating which port the link was connected with.
</span><div class="details" id="dproplinkConnected"><p>
If the value is a function, that function must not modify what this Node is connected with.
The Link has already been added -- trying to remove it or another link may produce undefined behavior.
However, the other end of the link may not yet have been connected with a node (and might never be),
so you cannot depend on looking at what the link connects with.
<p>
The default value is null -- no function is called.</div>
</div>
</td>
</tr>
<tr id="linkDisconnected" >
<td class="name">
<div class="name">
linkDisconnected
</div>
<div class="attributes">
<span class="light">{function(Node, Link, GraphObject) | null}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the function that is called after a <a href="../symbols/Link.html" class="linkConstructor">Link</a> has been disconnected from this Node.<span class="nodetails" id="xproplinkDisconnected"><a class="morelink" onclick="hst('proplinkDisconnected')">More...</a></span> <span class="details" id="proplinkDisconnected">
It is typically used to modify the appearance of the node.
The first argument will be this Node.
The second argument will be a Link that had been connected with this node.
The third argument will be a GraphObject port indicating which port the link had been connected with.
</span><div class="details" id="dproplinkDisconnected"><p>
If the value is a function, that function must not modify what this Node is connected with.
The Link has already been removed -- trying to add it or another link may produce undefined behavior.
The other end of the link may not yet have been disconnected from a node (and might never be),
so you cannot depend on looking at what the link connects with.
<p>
The default value is null -- no function is called.</div>
</div>
</td>
</tr>
<tr id="linksConnected" >
<td class="name">
<div class="name">
linksConnected
</div>
<div class="attributes">
<span class="light">{Iterator.<Link>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>This read-only property returns an iterator over all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that are connected with this node.<span class="nodetails" id="xproplinksConnected"><a class="morelink" onclick="hst('proplinksConnected')">More...</a></span> <span class="details" id="proplinksConnected">
This includes both links that are coming out of this node as well as links that are going into this node.
Setting <a href="../symbols/Link.html#fromNode" class="linkProperty">Link.fromNode</a> or <a href="../symbols/Link.html#toNode" class="linkProperty">Link.toNode</a> to refer to this Node
will add that <a href="../symbols/Link.html" class="linkConstructor">Link</a> to this collection.
</span><div class="details" id="dproplinksConnected"><p>
Use the <a href="../symbols/Node.html#findLinksConnected" class="linkMethod">findLinksConnected</a>, <a href="../symbols/Node.html#findLinksOutOf" class="linkMethod">findLinksOutOf</a>, or <a href="../symbols/Node.html#findLinksInto" class="linkMethod">findLinksInto</a> methods
to get different subsets of the links, depending on direction or depending on connecting to a particular port.
<p>
A template should not have any links connected with it.</div>
</div>
</td>
</tr>
<tr id="linkValidation" >
<td class="name">
<div class="name">
linkValidation
</div>
<div class="attributes">
<span class="light">{function(Node, GraphObject, Node, GraphObject, Link):boolean | null}</span>
<span class="since" title="since">1.3</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets a predicate that determines whether or not a Link may be connected with this node.<span class="nodetails" id="xproplinkValidation"><a class="morelink" onclick="hst('proplinkValidation')">More...</a></span> <span class="details" id="proplinkValidation">
If this is non-null, the predicate is called in addition to the predicate that is <a href="../symbols/LinkingBaseTool.html#linkValidation" class="linkProperty">LinkingBaseTool.linkValidation</a>
on the <a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a> and <a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a>.
See <a href="../symbols/LinkingBaseTool.html#isValidLink" class="linkMethod">LinkingBaseTool.isValidLink</a> for more details.
</span><div class="details" id="dproplinkValidation"><p>
The default predicate is null, which is equivalent to simply returning true.
The first argument will be the proposed "from" Node (may be null).
The second argument will be the proposed "from" GraphObject port (may be null).
The third argument will be the proposed "to" Node (may be null).
The fourth argument will be the proposed "to" GraphObject port (may be null).
The fifth argument may be null when asking about creating a new link,
or may be a Link when asking about reconnecting an existing link.
<p>
The function, if supplied, must not have any side-effects.</div>
</div>
</td>
</tr>
<tr id="port" >
<td class="name">
<div class="name">
port
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>This read-only property returns the primary <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a> representing a port in this node.<span class="nodetails" id="xpropport"><a class="morelink" onclick="hst('propport')">More...</a></span> <span class="details" id="propport">
If there is a GraphObject whose <a href="../symbols/GraphObject.html#portId" class="linkProperty">GraphObject.portId</a> is the empty string, return it.
If there is no such element, just return this whole Node.</span>
</div>
</td>
</tr>
<tr id="ports" >
<td class="name">
<div class="name">
ports
</div>
<div class="attributes">
<span class="light">{Iterator.<GraphObject>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>This read-only property returns an iterator over all of the <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>s in this node that act as ports.
</div>
</td>
</tr>
<tr id="portSpreading" >
<td class="name">
<div class="name">
portSpreading
</div>
<div class="attributes">
<span class="light">{EnumValue}</span>
<span class="since" title="since">1.5</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets how link points are computed when the port spot is a "side" spot.<span class="nodetails" id="xpropportSpreading"><a class="morelink" onclick="hst('propportSpreading')">More...</a></span> <span class="details" id="propportSpreading">
The default value is <a href="../symbols/Node.html#SpreadingEvenly" class="linkConstant">Node.SpreadingEvenly</a>.</span>
</div>
</td>
</tr>
<tr id="treeExpandedChanged" >
<td class="name">
<div class="name">
treeExpandedChanged
</div>
<div class="attributes">
<span class="light">{function(Node) | null}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the function that is called when <a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">isTreeExpanded</a> has changed value.<span class="nodetails" id="xproptreeExpandedChanged"><a class="morelink" onclick="hst('proptreeExpandedChanged')">More...</a></span> <span class="details" id="proptreeExpandedChanged">
The argument to that function will be this Node.
</span><div class="details" id="dproptreeExpandedChanged"><p>
If the value is a function, that function must not expand or collapse any trees of nodes and links.
The Node has already been expanded or collapsed -- trying to change it again may produce undefined behavior.
<p>
The default value is null -- no function is called.</div>
</div>
</td>
</tr>
<tr id="wasTreeExpanded" >
<td class="name">
<div class="name">
wasTreeExpanded
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether the subtree graph starting at this node
had been collapsed by a call to <a href="../symbols/Node.html#expandTree" class="linkMethod">expandTree</a> on the parent node.<span class="nodetails" id="xpropwasTreeExpanded"><a class="morelink" onclick="hst('propwasTreeExpanded')">More...</a></span> <span class="details" id="propwasTreeExpanded">
The initial value is false.</span>
<div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">isTreeExpanded</a></li>
</ul>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<dl class="inheritsList">
<dt>Properties borrowed from class <a href="../symbols/Part.html" class="linkConstructor">Part</a>: </dt><dd><a href="../symbols/Part.html#adornments" class="linkProperty">adornments</a>, <a href="../symbols/Part.html#category" class="linkProperty">category</a>, <a href="../symbols/Part.html#containingGroup" class="linkProperty">containingGroup</a>, <a href="../symbols/Part.html#containingGroupChanged" class="linkProperty">containingGroupChanged</a>, <a href="../symbols/Part.html#copyable" class="linkProperty">copyable</a>, <a href="../symbols/Part.html#deletable" class="linkProperty">deletable</a>, <a href="../symbols/Part.html#diagram" class="linkProperty">diagram</a>, <a href="../symbols/Part.html#dragComputation" class="linkProperty">dragComputation</a>, <a href="../symbols/Part.html#groupable" class="linkProperty">groupable</a>, <a href="../symbols/Part.html#highlightedChanged" class="linkProperty">highlightedChanged</a>, <a href="../symbols/Part.html#isAnimated" class="linkProperty">isAnimated</a>, <a href="../symbols/Part.html#isHighlighted" class="linkProperty">isHighlighted</a>, <a href="../symbols/Part.html#isInDocumentBounds" class="linkProperty">isInDocumentBounds</a>, <a href="../symbols/Part.html#isLayoutPositioned" class="linkProperty">isLayoutPositioned</a>, <a href="../symbols/Part.html#isSelected" class="linkProperty">isSelected</a>, <a href="../symbols/Part.html#isShadowed" class="linkProperty">isShadowed</a>, <a href="../symbols/Part.html#isTopLevel" class="linkProperty">isTopLevel</a>, <a href="../symbols/Part.html#key" class="linkProperty">key</a>, <a href="../symbols/Part.html#layer" class="linkProperty">layer</a>, <a href="../symbols/Part.html#layerChanged" class="linkProperty">layerChanged</a>, <a href="../symbols/Part.html#layerName" class="linkProperty">layerName</a>, <a href="../symbols/Part.html#LayoutAdded" class="linkConstant">LayoutAdded</a>, <a href="../symbols/Part.html#layoutConditions" class="linkProperty">layoutConditions</a>, <a href="../symbols/Part.html#LayoutGroupLayout" class="linkConstant">LayoutGroupLayout</a>, <a href="../symbols/Part.html#LayoutHidden" class="linkConstant">LayoutHidden</a>, <a href="../symbols/Part.html#LayoutNodeReplaced" class="linkConstant">LayoutNodeReplaced</a>, <a href="../symbols/Part.html#LayoutNodeSized" class="linkConstant">LayoutNodeSized</a>, <a href="../symbols/Part.html#LayoutNone" class="linkConstant">LayoutNone</a>, <a href="../symbols/Part.html#LayoutRemoved" class="linkConstant">LayoutRemoved</a>, <a href="../symbols/Part.html#LayoutShown" class="linkConstant">LayoutShown</a>, <a href="../symbols/Part.html#LayoutStandard" class="linkConstant">LayoutStandard</a>, <a href="../symbols/Part.html#location" class="linkProperty">location</a>, <a href="../symbols/Part.html#locationObject" class="linkProperty">locationObject</a>, <a href="../symbols/Part.html#locationObjectName" class="linkProperty">locationObjectName</a>, <a href="../symbols/Part.html#locationSpot" class="linkProperty">locationSpot</a>, <a href="../symbols/Part.html#maxLocation" class="linkProperty">maxLocation</a>, <a href="../symbols/Part.html#minLocation" class="linkProperty">minLocation</a>, <a href="../symbols/Part.html#movable" class="linkProperty">movable</a>, <a href="../symbols/Part.html#reshapable" class="linkProperty">reshapable</a>, <a href="../symbols/Part.html#resizable" class="linkProperty">resizable</a>, <a href="../symbols/Part.html#resizeAdornmentTemplate" class="linkProperty">resizeAdornmentTemplate</a>, <a href="../symbols/Part.html#resizeCellSize" class="linkProperty">resizeCellSize</a>, <a href="../symbols/Part.html#resizeObject" class="linkProperty">resizeObject</a>, <a href="../symbols/Part.html#resizeObjectName" class="linkProperty">resizeObjectName</a>, <a href="../symbols/Part.html#rotatable" class="linkProperty">rotatable</a>, <a href="../symbols/Part.html#rotateAdornmentTemplate" class="linkProperty">rotateAdornmentTemplate</a>, <a href="../symbols/Part.html#rotateObject" class="linkProperty">rotateObject</a>, <a href="../symbols/Part.html#rotateObjectName" class="linkProperty">rotateObjectName</a>, <a href="../symbols/Part.html#selectable" class="linkProperty">selectable</a>, <a href="../symbols/Part.html#selectionAdorned" class="linkProperty">selectionAdorned</a>, <a href="../symbols/Part.html#selectionAdornmentTemplate" class="linkProperty">selectionAdornmentTemplate</a>, <a href="../symbols/Part.html#selectionChanged" class="linkProperty">selectionChanged</a>, <a href="../symbols/Part.html#selectionObject" class="linkProperty">selectionObject</a>, <a href="../symbols/Part.html#selectionObjectName" class="linkProperty">selectionObjectName</a>, <a href="../symbols/Part.html#shadowBlur" class="linkProperty">shadowBlur</a>, <a href="../symbols/Part.html#shadowColor" class="linkProperty">shadowColor</a>, <a href="../symbols/Part.html#shadowOffset" class="linkProperty">shadowOffset</a>, <a href="../symbols/Part.html#text" class="linkProperty">text</a>, <a href="../symbols/Part.html#textEditable" class="linkProperty">textEditable</a>, <a href="../symbols/Part.html#zOrder" class="linkProperty">zOrder</a></dd><dt>Properties borrowed from class <a href="../symbols/Panel.html" class="linkConstructor">Panel</a>: </dt><dd><a href="../symbols/Panel.html#alignmentFocusName" class="linkProperty">alignmentFocusName</a>, <a href="../symbols/Panel.html#Auto" class="linkConstant">Auto</a>, <a href="../symbols/Panel.html#columnCount" class="linkProperty">columnCount</a>, <a href="../symbols/Panel.html#columnSizing" class="linkProperty">columnSizing</a>, <a href="../symbols/Panel.html#data" class="linkProperty">data</a>, <a href="../symbols/Panel.html#defaultAlignment" class="linkProperty">defaultAlignment</a>, <a href="../symbols/Panel.html#defaultColumnSeparatorDashArray" class="linkProperty">defaultColumnSeparatorDashArray</a>, <a href="../symbols/Panel.html#defaultColumnSeparatorStroke" class="linkProperty">defaultColumnSeparatorStroke</a>, <a href="../symbols/Panel.html#defaultColumnSeparatorStrokeWidth" class="linkProperty">defaultColumnSeparatorStrokeWidth</a>, <a href="../symbols/Panel.html#defaultRowSeparatorDashArray" class="linkProperty">defaultRowSeparatorDashArray</a>, <a href="../symbols/Panel.html#defaultRowSeparatorStroke" class="linkProperty">defaultRowSeparatorStroke</a>, <a href="../symbols/Panel.html#defaultRowSeparatorStrokeWidth" class="linkProperty">defaultRowSeparatorStrokeWidth</a>, <a href="../symbols/Panel.html#defaultSeparatorPadding" class="linkProperty">defaultSeparatorPadding</a>, <a href="../symbols/Panel.html#defaultStretch" class="linkProperty">defaultStretch</a>, <a href="../symbols/Panel.html#elements" class="linkProperty">elements</a>, <a href="../symbols/Panel.html#Graduated" class="linkConstant">Graduated</a>, <a href="../symbols/Panel.html#graduatedMax" class="linkProperty">graduatedMax</a>, <a href="../symbols/Panel.html#graduatedMin" class="linkProperty">graduatedMin</a>, <a href="../symbols/Panel.html#graduatedRange" class="linkProperty">graduatedRange</a>, <a href="../symbols/Panel.html#graduatedTickBase" class="linkProperty">graduatedTickBase</a>, <a href="../symbols/Panel.html#graduatedTickUnit" class="linkProperty">graduatedTickUnit</a>, <a href="../symbols/Panel.html#Grid" class="linkConstant">Grid</a>, <a href="../symbols/Panel.html#gridCellSize" class="linkProperty">gridCellSize</a>, <a href="../symbols/Panel.html#gridOrigin" class="linkProperty">gridOrigin</a>, <a href="../symbols/Panel.html#Horizontal" class="linkConstant">Horizontal</a>, <a href="../symbols/Panel.html#isClipping" class="linkProperty">isClipping</a>, <a href="../symbols/Panel.html#isEnabled" class="linkProperty">isEnabled</a>, <a href="../symbols/Panel.html#isOpposite" class="linkProperty">isOpposite</a>, <a href="../symbols/Panel.html#itemArray" class="linkProperty">itemArray</a>, <a href="../symbols/Panel.html#itemCategoryProperty" class="linkProperty">itemCategoryProperty</a>, <a href="../symbols/Panel.html#itemIndex" class="linkProperty">itemIndex</a>, <a href="../symbols/Panel.html#itemTemplate" class="linkProperty">itemTemplate</a>, <a href="../symbols/Panel.html#itemTemplateMap" class="linkProperty">itemTemplateMap</a>, <a href="../symbols/Panel.html#leftIndex" class="linkProperty">leftIndex</a>, <a href="../symbols/Panel.html#Link" class="linkConstant">Link</a>, <a href="../symbols/Panel.html#padding" class="linkProperty">padding</a>, <a href="../symbols/Panel.html#Position" class="linkConstant">Position</a>, <a href="../symbols/Panel.html#rowCount" class="linkProperty">rowCount</a>, <a href="../symbols/Panel.html#rowSizing" class="linkProperty">rowSizing</a>, <a href="../symbols/Panel.html#Spot" class="linkConstant">Spot</a>, <a href="../symbols/Panel.html#Table" class="linkConstant">Table</a>, <a href="../symbols/Panel.html#TableColumn" class="linkConstant">TableColumn</a>, <a href="../symbols/Panel.html#TableRow" class="linkConstant">TableRow</a>, <a href="../symbols/Panel.html#topIndex" class="linkProperty">topIndex</a>, <a href="../symbols/Panel.html#type" class="linkProperty">type</a>, <a href="../symbols/Panel.html#Vertical" class="linkConstant">Vertical</a>, <a href="../symbols/Panel.html#Viewbox" class="linkConstant">Viewbox</a>, <a href="../symbols/Panel.html#viewboxStretch" class="linkProperty">viewboxStretch</a></dd><dt>Properties borrowed from class <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>: </dt><dd><a href="../symbols/GraphObject.html#actionCancel" class="linkProperty">actionCancel</a>, <a href="../symbols/GraphObject.html#actionDown" class="linkProperty">actionDown</a>, <a href="../symbols/GraphObject.html#actionMove" class="linkProperty">actionMove</a>, <a href="../symbols/GraphObject.html#actionUp" class="linkProperty">actionUp</a>, <a href="../symbols/GraphObject.html#actualBounds" class="linkProperty">actualBounds</a>, <a href="../symbols/GraphObject.html#alignment" class="linkProperty">alignment</a>, <a href="../symbols/GraphObject.html#alignmentFocus" class="linkProperty">alignmentFocus</a>, <a href="../symbols/GraphObject.html#angle" class="linkProperty">angle</a>, <a href="../symbols/GraphObject.html#areaBackground" class="linkProperty">areaBackground</a>, <a href="../symbols/GraphObject.html#background" class="linkProperty">background</a>, <a href="../symbols/GraphObject.html#click" class="linkProperty">click</a>, <a href="../symbols/GraphObject.html#column" class="linkProperty">column</a>, <a href="../symbols/GraphObject.html#columnSpan" class="linkProperty">columnSpan</a>, <a href="../symbols/GraphObject.html#contextClick" class="linkProperty">contextClick</a>, <a href="../symbols/GraphObject.html#contextMenu" class="linkProperty">contextMenu</a>, <a href="../symbols/GraphObject.html#cursor" class="linkProperty">cursor</a>, <a href="../symbols/GraphObject.html#Default" class="linkConstant">Default</a>, <a href="../symbols/GraphObject.html#desiredSize" class="linkProperty">desiredSize</a>, <a href="../symbols/GraphObject.html#doubleClick" class="linkProperty">doubleClick</a>, <a href="../symbols/GraphObject.html#enabledChanged" class="linkProperty">enabledChanged</a>, <a href="../symbols/GraphObject.html#Fill" class="linkConstant">Fill</a>, <a href="../symbols/GraphObject.html#fromEndSegmentLength" class="linkProperty">fromEndSegmentLength</a>, <a href="../symbols/GraphObject.html#fromLinkable" class="linkProperty">fromLinkable</a>, <a href="../symbols/GraphObject.html#fromLinkableDuplicates" class="linkProperty">fromLinkableDuplicates</a>, <a href="../symbols/GraphObject.html#fromLinkableSelfNode" class="linkProperty">fromLinkableSelfNode</a>, <a href="../symbols/GraphObject.html#fromMaxLinks" class="linkProperty">fromMaxLinks</a>, <a href="../symbols/GraphObject.html#fromShortLength" class="linkProperty">fromShortLength</a>, <a href="../symbols/GraphObject.html#fromSpot" class="linkProperty">fromSpot</a>, <a href="../symbols/GraphObject.html#height" class="linkProperty">height</a>, <a href="../symbols/GraphObject.html#isActionable" class="linkProperty">isActionable</a>, <a href="../symbols/GraphObject.html#isPanelMain" class="linkProperty">isPanelMain</a>, <a href="../symbols/GraphObject.html#margin" class="linkProperty">margin</a>, <a href="../symbols/GraphObject.html#maxSize" class="linkProperty">maxSize</a>, <a href="../symbols/GraphObject.html#measuredBounds" class="linkProperty">measuredBounds</a>, <a href="../symbols/GraphObject.html#minSize" class="linkProperty">minSize</a>, <a href="../symbols/GraphObject.html#mouseDragEnter" class="linkProperty">mouseDragEnter</a>, <a href="../symbols/GraphObject.html#mouseDragLeave" class="linkProperty">mouseDragLeave</a>, <a href="../symbols/GraphObject.html#mouseDrop" class="linkProperty">mouseDrop</a>, <a href="../symbols/GraphObject.html#mouseEnter" class="linkProperty">mouseEnter</a>, <a href="../symbols/GraphObject.html#mouseHold" class="linkProperty">mouseHold</a>, <a href="../symbols/GraphObject.html#mouseHover" class="linkProperty">mouseHover</a>, <a href="../symbols/GraphObject.html#mouseLeave" class="linkProperty">mouseLeave</a>, <a href="../symbols/GraphObject.html#mouseOver" class="linkProperty">mouseOver</a>, <a href="../symbols/GraphObject.html#name" class="linkProperty">name</a>, <a href="../symbols/GraphObject.html#naturalBounds" class="linkProperty">naturalBounds</a>, <a href="../symbols/GraphObject.html#None" class="linkConstant">None</a>, <a href="../symbols/GraphObject.html#opacity" class="linkProperty">opacity</a>, <a href="../symbols/GraphObject.html#panel" class="linkProperty">panel</a>, <a href="../symbols/GraphObject.html#part" class="linkProperty">part</a>, <a href="../symbols/GraphObject.html#pickable" class="linkProperty">pickable</a>, <a href="../symbols/GraphObject.html#portId" class="linkProperty">portId</a>, <a href="../symbols/GraphObject.html#position" class="linkProperty">position</a>, <a href="../symbols/GraphObject.html#row" class="linkProperty">row</a>, <a href="../symbols/GraphObject.html#rowSpan" class="linkProperty">rowSpan</a>, <a href="../symbols/GraphObject.html#scale" class="linkProperty">scale</a>, <a href="../symbols/GraphObject.html#segmentFraction" class="linkProperty">segmentFraction</a>, <a href="../symbols/GraphObject.html#segmentIndex" class="linkProperty">segmentIndex</a>, <a href="../symbols/GraphObject.html#segmentOffset" class="linkProperty">segmentOffset</a>, <a href="../symbols/GraphObject.html#segmentOrientation" class="linkProperty">segmentOrientation</a>, <a href="../symbols/GraphObject.html#shadowVisible" class="linkProperty">shadowVisible</a>, <a href="../symbols/GraphObject.html#stretch" class="linkProperty">stretch</a>, <a href="../symbols/GraphObject.html#toEndSegmentLength" class="linkProperty">toEndSegmentLength</a>, <a href="../symbols/GraphObject.html#toLinkable" class="linkProperty">toLinkable</a>, <a href="../symbols/GraphObject.html#toLinkableDuplicates" class="linkProperty">toLinkableDuplicates</a>, <a href="../symbols/GraphObject.html#toLinkableSelfNode" class="linkProperty">toLinkableSelfNode</a>, <a href="../symbols/GraphObject.html#toMaxLinks" class="linkProperty">toMaxLinks</a>, <a href="../symbols/GraphObject.html#toolTip" class="linkProperty">toolTip</a>, <a href="../symbols/GraphObject.html#toShortLength" class="linkProperty">toShortLength</a>, <a href="../symbols/GraphObject.html#toSpot" class="linkProperty">toSpot</a>, <a href="../symbols/GraphObject.html#Uniform" class="linkConstant">Uniform</a>, <a href="../symbols/GraphObject.html#UniformToFill" class="linkConstant">UniformToFill</a>, <a href="../symbols/GraphObject.html#visible" class="linkProperty">visible</a>, <a href="../symbols/GraphObject.html#width" class="linkProperty">width</a></dd>
</dl>
<!-- ============================== methods summary ======================== -->
<h2 class="summaryCaption">Method <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the methods documented in the class Node.">
<thead>
<tr>
<th scope="col" class="name">Name, Return Type</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="collapseTree">
<td class="name">
<div class="name">
collapseTree(level)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Hide each child node and the connecting link,
and recursively collapse each child node.<span class="nodetails" id="xmethcollapseTree"><a class="morelink" onclick="hst('methcollapseTree')">More...</a></span> <span class="details" id="methcollapseTree">
This changes the value of <a href="../symbols/Part.html#isVisible" class="linkMethod">Part.isVisible</a> of the whole subtree and the parts owned by
those nodes and links.
However, this root node's visibility is unchanged.
</span><div class="details" id="dmethcollapseTree"><p>
Links are assumed to go from the parent node to the children nodes,
unless <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a> is false.
Links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.
<p>
This sets <a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">isTreeExpanded</a> to false on this node and on all of the children nodes.
For those child nodes that were expanded when they were collapsed,
<a href="../symbols/Node.html#wasTreeExpanded" class="linkProperty">wasTreeExpanded</a> is set to true.
<p>
You can also pass in a number of levels to hide nodes beyond a certain level starting at this node.
If you want to make sure that all nodes are expanded up to a particular level, call <a href="../symbols/Node.html#expandTree" class="linkMethod">expandTree</a>.
If you want to do both, call <code>expandTree</code> before calling <code>collapseTree</code> to
collapse nodes expanded due to the <a href="../symbols/Node.html#wasTreeExpanded" class="linkProperty">wasTreeExpanded</a> flag.
<p>
This method does not perform a transaction.
You may want to call the <a href="../symbols/CommandHandler.html#collapseTree" class="linkMethod">CommandHandler.collapseTree</a> command, which does perform a transaction
and raise a <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>.
<p>
To collapse a <a href="../symbols/Group.html" class="linkConstructor">Group</a>'s subgraph of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s and <a href="../symbols/Link.html" class="linkConstructor">Link</a>s, use <a href="../symbols/Group.html#collapseSubGraph" class="linkMethod">Group.collapseSubGraph</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#expandTree" class="linkMethod">expandTree</a></li>
<li><a href="../symbols/Node.html#findTreeParts" class="linkMethod">findTreeParts</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>level</b>
</dt>
<dd>How many levels of the tree, starting at this node, to keep expanded if already expanded;
the default is 1, hiding all tree children of this node. Values less than 1 are treated as 1.</dd>
</dl>
</div>
</td>
</tr>
<tr id="expandTree">
<td class="name">
<div class="name">
expandTree(level)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Show each child node and the connecting link,
and perhaps recursively expand their child nodes.<span class="nodetails" id="xmethexpandTree"><a class="morelink" onclick="hst('methexpandTree')">More...</a></span> <span class="details" id="methexpandTree">
This may change the value of <a href="../symbols/Part.html#isVisible" class="linkMethod">Part.isVisible</a> of the whole subtree and the parts owned by
those nodes and links.
However, this root node's visibility is unchanged.
</span><div class="details" id="dmethexpandTree"><p>
This sets <a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">isTreeExpanded</a> to true on this node and on all of the children nodes.
Links are assumed to go from the parent node to the children nodes,
unless <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a> is false.
Links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.
<p>
This will expand a tree child node only if its <a href="../symbols/Node.html#wasTreeExpanded" class="linkProperty">wasTreeExpanded</a> property was true.
<p>
You can also pass in a number of levels in order to be sure that all nodes
starting at this node and up through that number of levels are visible.
If you want to make sure that there are no nodes expanded after a particular level, call <a href="../symbols/Node.html#collapseTree" class="linkMethod">collapseTree</a>.
If you want to do both, call <code>expandTree</code> before calling <code>collapseTree</code> to
collapse nodes expanded due to the <a href="../symbols/Node.html#wasTreeExpanded" class="linkProperty">wasTreeExpanded</a> flag.
<p>
This method does not perform a transaction.
You may want to call the <a href="../symbols/CommandHandler.html#expandTree" class="linkMethod">CommandHandler.expandTree</a> command, which does perform a transaction
and raise a <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>.
<p>
To expand a <a href="../symbols/Group.html" class="linkConstructor">Group</a>'s subgraph of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s and <a href="../symbols/Link.html" class="linkConstructor">Link</a>s, use <a href="../symbols/Group.html#expandSubGraph" class="linkMethod">Group.expandSubGraph</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#collapseTree" class="linkMethod">collapseTree</a></li>
<li><a href="../symbols/Node.html#findTreeParts" class="linkMethod">findTreeParts</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>level</b>
</dt>
<dd>How many levels of the tree should be expanded;
the default is 2, showing all tree children of this node and potentially more.
Values less than 2 are treated as 2.</dd>
</dl>
</div>
</td>
</tr>
<tr id="findCommonTreeParent">
<td class="name">
<div class="name">
findCommonTreeParent(other)
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span>
<span class="since" title="since">1.5</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Find the <a href="../symbols/Node.html" class="linkConstructor">Node</a> that is the perhaps indirect tree parent of both this node and another one,
or this node if it is an ancestor of the other node, or vice-versa.<span class="nodetails" id="xmethfindCommonTreeParent"><a class="morelink" onclick="hst('methfindCommonTreeParent')">More...</a></span> <span class="details" id="methfindCommonTreeParent">
</span><div class="details" id="dmethfindCommonTreeParent"><p>
If you want to find the <a href="../symbols/Group.html" class="linkConstructor">Group</a> that contains two Parts, call <a href="../symbols/Part.html#findCommonContainingGroup" class="linkMethod">Part.findCommonContainingGroup</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> <b>other</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> may be null if in different trees,
or may be itself if the OTHER argument is THIS node,
or may be itself if the OTHER node is a descendant of THIS node,
or may be the OTHER node if THIS node is in the tree of the OTHER node.</dt>
</dl>
</div>
</td>
</tr>
<tr id="findLinksBetween">
<td class="name">
<div class="name">
findLinksBetween(othernode, pid, otherpid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Link>}</span>
<span class="since" title="since">1.2</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that go from this node to another node or vice-versa,
perhaps limited to a given port id on this node and a port id on the other node.<span class="nodetails" id="xmethfindLinksBetween"><a class="morelink" onclick="hst('methfindLinksBetween')">More...</a></span> <span class="details" id="methfindLinksBetween">
</span><div class="details" id="dmethfindLinksBetween"><p>
If you want all of the links between two nodes in just one direction, use <a href="../symbols/Node.html#findLinksTo" class="linkMethod">findLinksTo</a>.</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> <b>othernode</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>otherpid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Link>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findLinksConnected">
<td class="name">
<div class="name">
findLinksConnected(pid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Link>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that connect with this node in either direction,
perhaps limited to the given port id on this node.<span class="nodetails" id="xmethfindLinksConnected"><a class="morelink" onclick="hst('methfindLinksConnected')">More...</a></span> <span class="details" id="methfindLinksConnected"></span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Link>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findLinksInto">
<td class="name">
<div class="name">
findLinksInto(pid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Link>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that go into this node,
perhaps limited to the given port id on this node.<span class="nodetails" id="xmethfindLinksInto"><a class="morelink" onclick="hst('methfindLinksInto')">More...</a></span> <span class="details" id="methfindLinksInto"></span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Link>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findLinksOutOf">
<td class="name">
<div class="name">
findLinksOutOf(pid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Link>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that come out of this node,
perhaps limited to the given port id on this node.<span class="nodetails" id="xmethfindLinksOutOf"><a class="morelink" onclick="hst('methfindLinksOutOf')">More...</a></span> <span class="details" id="methfindLinksOutOf"></span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Link>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findLinksTo">
<td class="name">
<div class="name">
findLinksTo(othernode, pid, otherpid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Link>}</span>
<span class="since" title="since">1.2</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that go from this node to another node,
perhaps limited to a given port id on this node and a port id on the other node.<span class="nodetails" id="xmethfindLinksTo"><a class="morelink" onclick="hst('methfindLinksTo')">More...</a></span> <span class="details" id="methfindLinksTo">
</span><div class="details" id="dmethfindLinksTo"><p>
If you want all of the links between two nodes in both directions, use <a href="../symbols/Node.html#findLinksBetween" class="linkMethod">findLinksBetween</a>.</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> <b>othernode</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>otherpid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Link>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findNodesConnected">
<td class="name">
<div class="name">
findNodesConnected(pid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Node>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over the <a href="../symbols/Node.html" class="linkConstructor">Node</a>s that are connected with this node
in either direction, perhaps limited to the given port id on this node.<span class="nodetails" id="xmethfindNodesConnected"><a class="morelink" onclick="hst('methfindNodesConnected')">More...</a></span> <span class="details" id="methfindNodesConnected">
</span><div class="details" id="dmethfindNodesConnected"><p>
The results may include this node itself if there is a reflexive link connecting this node with itself.</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Node>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findNodesInto">
<td class="name">
<div class="name">
findNodesInto(pid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Node>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over the <a href="../symbols/Node.html" class="linkConstructor">Node</a>s that are connected with this node
by links going into this node, perhaps limited to the given port id on this node.<span class="nodetails" id="xmethfindNodesInto"><a class="morelink" onclick="hst('methfindNodesInto')">More...</a></span> <span class="details" id="methfindNodesInto"></span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Node>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findNodesOutOf">
<td class="name">
<div class="name">
findNodesOutOf(pid)
</div>
<div class="attributes">
<span class="light">{Iterator.<Node>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an iterator over the <a href="../symbols/Node.html" class="linkConstructor">Node</a>s that are connected with this node
by links coming out of this node, perhaps limited to the given port id on this node.<span class="nodetails" id="xmethfindNodesOutOf"><a class="morelink" onclick="hst('methfindNodesOutOf')">More...</a></span> <span class="details" id="methfindNodesOutOf"></span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{string|null=}</span> <b>pid</b>
</dt>
<dd>A port identifier string; if null the link's portId is ignored and all links are included in the search.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Node>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findPort">
<td class="name">
<div class="name">
findPort(pid)
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Find a <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a> with a given <a href="../symbols/GraphObject.html#portId" class="linkProperty">GraphObject.portId</a>.<span class="nodetails" id="xmethfindPort"><a class="morelink" onclick="hst('methfindPort')">More...</a></span> <span class="details" id="methfindPort">
If no such GraphObject is found, search for one with the empty string as its port identifier.
Finally, when failing to find a port with either the given name or the empty string,
this method returns this whole node itself.</span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{string}</span> <b>pid</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeChildrenLinks">
<td class="name">
<div class="name">
findTreeChildrenLinks()
</div>
<div class="attributes">
<span class="light">{Iterator.<Link>}</span>
<span class="since" title="since">1.1</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an <a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a> for the collection of <a href="../symbols/Link.html" class="linkConstructor">Link</a>s that connect with the immediate tree children of this node.<span class="nodetails" id="xmethfindTreeChildrenLinks"><a class="morelink" onclick="hst('methfindTreeChildrenLinks')">More...</a></span> <span class="details" id="methfindTreeChildrenLinks">
Links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.
</span><div class="details" id="dmethfindTreeChildrenLinks"><p>
This basically returns either <a href="../symbols/Node.html#findLinksOutOf" class="linkMethod">findLinksOutOf</a> or <a href="../symbols/Node.html#findLinksInto" class="linkMethod">findLinksInto</a>,
depending on <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a>,
but the results excludes links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeParentLink" class="linkMethod">findTreeParentLink</a></li>
<li><a href="../symbols/Node.html#findTreeChildrenNodes" class="linkMethod">findTreeChildrenNodes</a></li>
<li><a href="../symbols/Node.html#findTreeParts" class="linkMethod">findTreeParts</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Link>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeChildrenNodes">
<td class="name">
<div class="name">
findTreeChildrenNodes()
</div>
<div class="attributes">
<span class="light">{Iterator.<Node>}</span>
<span class="since" title="since">1.1</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns an <a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a> for the collection of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s that are the immediate tree children of this node.<span class="nodetails" id="xmethfindTreeChildrenNodes"><a class="morelink" onclick="hst('methfindTreeChildrenNodes')">More...</a></span> <span class="details" id="methfindTreeChildrenNodes">
Nodes only connected by links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.
</span><div class="details" id="dmethfindTreeChildrenNodes"><p>
This basically returns either <a href="../symbols/Node.html#findNodesOutOf" class="linkMethod">findNodesOutOf</a> or <a href="../symbols/Node.html#findNodesInto" class="linkMethod">findNodesInto</a>,
depending on <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeParentNode" class="linkMethod">findTreeParentNode</a></li>
<li><a href="../symbols/Node.html#findTreeChildrenLinks" class="linkMethod">findTreeChildrenLinks</a></li>
<li><a href="../symbols/Node.html#findTreeParts" class="linkMethod">findTreeParts</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Iterator.<Node>}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeLevel">
<td class="name">
<div class="name">
findTreeLevel()
</div>
<div class="attributes">
<span class="light">{number}</span>
<span class="since" title="since">1.5</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Return how deep this node is in a tree structure.<span class="nodetails" id="xmethfindTreeLevel"><a class="morelink" onclick="hst('methfindTreeLevel')">More...</a></span> <span class="details" id="methfindTreeLevel">
For tree root nodes, this returns zero.
This calls <a href="../symbols/Node.html#findTreeParentNode" class="linkMethod">findTreeParentNode</a> to find any tree parent node,
so this respects <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a> and <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a>
to know which way to traverse links and to know to ignore non-tree links.
</span><div class="details" id="dmethfindTreeLevel"><p>
This may result in undefined behavior if there are cycles of Links that are <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a>.
<p>
If you want to know how deep a Part is nested inside Groups, call <a href="../symbols/Part.html#findSubGraphLevel" class="linkMethod">Part.findSubGraphLevel</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{number}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeParentChain">
<td class="name">
<div class="name">
findTreeParentChain()
</div>
<div class="attributes">
<span class="light">{Set.<Part>}</span>
<span class="since" title="since">1.7</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Return a collection of <a href="../symbols/Part.html" class="linkConstructor">Part</a>s including this <a href="../symbols/Node.html" class="linkConstructor">Node</a>,
its tree parent link and node, and so on up the chain to the root node.<span class="nodetails" id="xmethfindTreeParentChain"><a class="morelink" onclick="hst('methfindTreeParentChain')">More...</a></span> <span class="details" id="methfindTreeParentChain">
</span><div class="details" id="dmethfindTreeParentChain"><p>
This calls <a href="../symbols/Node.html#findTreeParentLink" class="linkMethod">findTreeParentLink</a> and <a href="../symbols/Node.html#findTreeParentNode" class="linkMethod">findTreeParentNode</a>.
Links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.
<p>
This may result in undefined behavior if there are cycles of Links that are <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a>.
<p>
The result will include this node and the "root" node and all nodes and links in between.
The root node is also accessible directly via <a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a>.
If any of the nodes are <a href="../symbols/Group.html" class="linkConstructor">Group</a>s, their member parts are not included.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a></li>
<li><a href="../symbols/Node.html#findTreeParts" class="linkMethod">findTreeParts</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Set.<Part>}</span> A Set of Nodes and Links.</dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeParentLink">
<td class="name">
<div class="name">
findTreeParentLink()
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span>
<span class="since" title="since">1.1</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns the <a href="../symbols/Link.html" class="linkConstructor">Link</a> that connects with the tree parent <a href="../symbols/Node.html" class="linkConstructor">Node</a> of this node if the graph is tree-structured,
if there is such a link and <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is true.<span class="nodetails" id="xmethfindTreeParentLink"><a class="morelink" onclick="hst('methfindTreeParentLink')">More...</a></span> <span class="details" id="methfindTreeParentLink"></span>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeParentNode" class="linkMethod">findTreeParentNode</a></li>
<li><a href="../symbols/Node.html#findTreeChildrenLinks" class="linkMethod">findTreeChildrenLinks</a></li>
<li><a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a></li>
<li><a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span> The Link to the parent Node, or null if there is no parent node.</dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeParentNode">
<td class="name">
<div class="name">
findTreeParentNode()
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span>
<span class="since" title="since">1.1</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Returns the <a href="../symbols/Node.html" class="linkConstructor">Node</a> that is the tree parent of this node if the graph is tree-structured, if there is a parent.<span class="nodetails" id="xmethfindTreeParentNode"><a class="morelink" onclick="hst('methfindTreeParentNode')">More...</a></span> <span class="details" id="methfindTreeParentNode">
Links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.</span>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeParentLink" class="linkMethod">findTreeParentLink</a></li>
<li><a href="../symbols/Node.html#findTreeChildrenNodes" class="linkMethod">findTreeChildrenNodes</a></li>
<li><a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a></li>
<li><a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> The parent Node, or null if there is no parent node.</dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeParts">
<td class="name">
<div class="name">
findTreeParts(level)
</div>
<div class="attributes">
<span class="light">{Set.<Part>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Return a collection of <a href="../symbols/Part.html" class="linkConstructor">Part</a>s including this <a href="../symbols/Node.html" class="linkConstructor">Node</a>,
all of the <a href="../symbols/Link.html" class="linkConstructor">Link</a>s going to child <a href="../symbols/Node.html" class="linkConstructor">Node</a>s, and all of their
tree child nodes and links.<span class="nodetails" id="xmethfindTreeParts"><a class="morelink" onclick="hst('methfindTreeParts')">More...</a></span> <span class="details" id="methfindTreeParts">
Links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false are ignored.
</span><div class="details" id="dmethfindTreeParts"><p>
Whether child nodes are found for a parent node by following links out of the parent node or
by links coming into the parent node is determined by the value of <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a>.
<p>
The result will include this, the "root" node.
If any of the nodes are <a href="../symbols/Group.html" class="linkConstructor">Group</a>s, their member parts are not included.
<p>
If you want to find the collection of Parts that are contained by a <a href="../symbols/Group.html" class="linkConstructor">Group</a>, use <a href="../symbols/Group.html#findSubGraphParts" class="linkMethod">Group.findSubGraphParts</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeChildrenNodes" class="linkMethod">findTreeChildrenNodes</a></li>
<li><a href="../symbols/Node.html#findTreeChildrenLinks" class="linkMethod">findTreeChildrenLinks</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>level</b>
</dt>
<dd>How many levels of the tree, starting at this node, to include;
the default is Infinity, including all tree children of this node. Values less than 1 are treated as 1.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Set.<Part>}</span> A Set of Nodes and Links.</dt>
</dl>
</div>
</td>
</tr>
<tr id="findTreeRoot">
<td class="name">
<div class="name">
findTreeRoot()
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span>
<span class="since" title="since">1.2</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Return the <a href="../symbols/Node.html" class="linkConstructor">Node</a> that is at the root of the tree that this node is in, perhaps this node itself.<span class="nodetails" id="xmethfindTreeRoot"><a class="morelink" onclick="hst('methfindTreeRoot')">More...</a></span> <span class="details" id="methfindTreeRoot">
</span><div class="details" id="dmethfindTreeRoot"><p>
This node will be <a href="../symbols/Node.html#isInTreeOf" class="linkMethod">isInTreeOf</a> the resulting node, unless the resulting node is this node itself.
The graph traversal will ignore links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false.
<p>
If you want to search up the containment hierarchy of <a href="../symbols/Group.html" class="linkConstructor">Group</a>s, use <a href="../symbols/Part.html#findTopLevelPart" class="linkMethod">Part.findTopLevelPart</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> If this Node has no "tree parent", this returns itself.</dt>
</dl>
</div>
</td>
</tr>
<tr id="isInTreeOf">
<td class="name">
<div class="name">
isInTreeOf(node)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate is true if this node is a child of the given <a href="../symbols/Node.html" class="linkConstructor">Node</a>, perhaps indirectly as a descendant.<span class="nodetails" id="xmethisInTreeOf"><a class="morelink" onclick="hst('methisInTreeOf')">More...</a></span> <span class="details" id="methisInTreeOf">
</span><div class="details" id="dmethisInTreeOf"><p>
If this node is a child of the given node according to <a href="../symbols/Diagram.html#isTreePathToChildren" class="linkProperty">Diagram.isTreePathToChildren</a>, this returns true.
Otherwise this searches recursively the chain of tree parents of this node,
ignoring links for which <a href="../symbols/Link.html#isTreeLink" class="linkProperty">Link.isTreeLink</a> is false.
A node cannot be in its own subtree.
<p>
If you what to find out whether this Node is (perhaps indirectly) contained by a Group, use <a href="../symbols/Part.html#isMemberOf" class="linkMethod">Part.isMemberOf</a>.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/Node.html#findTreeRoot" class="linkMethod">findTreeRoot</a></li>
<li><a href="../symbols/Node.html#findTreeParentChain" class="linkMethod">findTreeParentChain</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> <b>node</b>
</dt>
<dd>the Node that might be a parent or ancestor of this node.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> true if the given node is an ancestor of this node, but false otherwise, including false if it is the same node.</dt>
</dl>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<dl class="inheritsList">
<dt>Methods borrowed from class <a href="../symbols/Part.html" class="linkConstructor">Part</a>: </dt><dd><a href="../symbols/Part.html#addAdornment" class="linkMethod">addAdornment</a>, <a href="../symbols/Part.html#canCopy" class="linkMethod">canCopy</a>, <a href="../symbols/Part.html#canDelete" class="linkMethod">canDelete</a>, <a href="../symbols/Part.html#canEdit" class="linkMethod">canEdit</a>, <a href="../symbols/Part.html#canGroup" class="linkMethod">canGroup</a>, <a href="../symbols/Part.html#canLayout" class="linkMethod">canLayout</a>, <a href="../symbols/Part.html#canMove" class="linkMethod">canMove</a>, <a href="../symbols/Part.html#canReshape" class="linkMethod">canReshape</a>, <a href="../symbols/Part.html#canResize" class="linkMethod">canResize</a>, <a href="../symbols/Part.html#canRotate" class="linkMethod">canRotate</a>, <a href="../symbols/Part.html#canSelect" class="linkMethod">canSelect</a>, <a href="../symbols/Part.html#clearAdornments" class="linkMethod">clearAdornments</a>, <a href="../symbols/Part.html#ensureBounds" class="linkMethod">ensureBounds</a>, <a href="../symbols/Part.html#findAdornment" class="linkMethod">findAdornment</a>, <a href="../symbols/Part.html#findCommonContainingGroup" class="linkMethod">findCommonContainingGroup</a>, <a href="../symbols/Part.html#findSubGraphLevel" class="linkMethod">findSubGraphLevel</a>, <a href="../symbols/Part.html#findTopLevelPart" class="linkMethod">findTopLevelPart</a>, <a href="../symbols/Part.html#invalidateLayout" class="linkMethod">invalidateLayout</a>, <a href="../symbols/Part.html#isMemberOf" class="linkMethod">isMemberOf</a>, <a href="../symbols/Part.html#isVisible" class="linkMethod">isVisible</a>, <a href="../symbols/Part.html#move" class="linkMethod">move</a>, <a href="../symbols/Part.html#moveTo" class="linkMethod">moveTo</a>, <a href="../symbols/Part.html#removeAdornment" class="linkMethod">removeAdornment</a>, <a href="../symbols/Part.html#updateAdornments" class="linkMethod">updateAdornments</a>, <a href="../symbols/Part.html#updateRelationshipsFromData" class="linkMethod">updateRelationshipsFromData</a>, <a href="../symbols/Part.html#updateTargetBindings" class="linkMethod">updateTargetBindings</a></dd><dt>Methods borrowed from class <a href="../symbols/Panel.html" class="linkConstructor">Panel</a>: </dt><dd><a href="../symbols/Panel.html#add" class="linkMethod">add</a>, <a href="../symbols/Panel.html#copy" class="linkMethod">copy</a>, <a href="../symbols/Panel.html#elt" class="linkMethod">elt</a>, <a href="../symbols/Panel.html#findColumnForLocalX" class="linkMethod">findColumnForLocalX</a>, <a href="../symbols/Panel.html#findItemPanelForData" class="linkMethod">findItemPanelForData</a>, <a href="../symbols/Panel.html#findMainElement" class="linkMethod">findMainElement</a>, <a href="../symbols/Panel.html#findObject" class="linkMethod">findObject</a>, <a href="../symbols/Panel.html#findRowForLocalY" class="linkMethod">findRowForLocalY</a>, <a href="../symbols/Panel.html#getColumnDefinition" class="linkMethod">getColumnDefinition</a>, <a href="../symbols/Panel.html#getRowDefinition" class="linkMethod">getRowDefinition</a>, <a href="../symbols/Panel.html#graduatedPointForValue" class="linkMethod">graduatedPointForValue</a>, <a href="../symbols/Panel.html#graduatedValueForPoint" class="linkMethod">graduatedValueForPoint</a>, <a href="../symbols/Panel.html#insertAt" class="linkMethod">insertAt</a>, <a href="../symbols/Panel.html#rebuildItemElements" class="linkMethod">rebuildItemElements</a>, <a href="../symbols/Panel.html#remove" class="linkMethod">remove</a>, <a href="../symbols/Panel.html#removeAt" class="linkMethod">removeAt</a>, <a href="../symbols/Panel.html#removeColumnDefinition" class="linkMethod">removeColumnDefinition</a>, <a href="../symbols/Panel.html#removeRowDefinition" class="linkMethod">removeRowDefinition</a></dd><dt>Methods borrowed from class <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>: </dt><dd><a href="../symbols/GraphObject.html#bind" class="linkMethod">bind</a>, <a href="../symbols/GraphObject.html#getDocumentAngle" class="linkMethod">getDocumentAngle</a>, <a href="../symbols/GraphObject.html#getDocumentPoint" class="linkMethod">getDocumentPoint</a>, <a href="../symbols/GraphObject.html#getDocumentScale" class="linkMethod">getDocumentScale</a>, <a href="../symbols/GraphObject.html#getLocalPoint" class="linkMethod">getLocalPoint</a>, <a href="../symbols/GraphObject.html#isContainedBy" class="linkMethod">isContainedBy</a>, <a href="../symbols/GraphObject.html#isEnabledObject" class="linkMethod">isEnabledObject</a>, <a href="../symbols/GraphObject.html#isVisibleObject" class="linkMethod">isVisibleObject</a>, <a href="../symbols/GraphObject.html#setProperties" class="linkMethod">setProperties</a></dd>
</dl>
<!-- ============================== events summary ======================== -->
<!-- ============================== fields summary ===================== -->
<h2 class="summaryCaption">Constants<span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the properties documented in the class Node.">
<thead>
<tr>
<th scope="col" class="name">Name</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="SpreadingEvenly">
<td class="name">
<div class="name">
SpreadingEvenly
<span class="light">{EnumValue}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This default value for <a href="../symbols/Node.html#portSpreading" class="linkProperty">Node.portSpreading</a> indicates that links connecting with a port
should be distributed evenly along the side(s) indicated by a Spot that is <a href="../symbols/Spot.html#isSide" class="linkMethod">Spot.isSide</a>.
</div>
</td>
</tr>
<tr id="SpreadingNone">
<td class="name">
<div class="name">
SpreadingNone
<span class="light">{EnumValue}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This value for <a href="../symbols/Node.html#portSpreading" class="linkProperty">Node.portSpreading</a> indicates that links connecting with a port
should all connect at a single point on the side(s) indicated by a Spot that is <a href="../symbols/Spot.html#isSide" class="linkMethod">Spot.isSide</a>.
</div>
</td>
</tr>
<tr id="SpreadingPacked">
<td class="name">
<div class="name">
SpreadingPacked
<span class="light">{EnumValue}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This value for <a href="../symbols/Node.html#portSpreading" class="linkProperty">Node.portSpreading</a> indicates that links connecting with a port
should packed together based on the link's shape's width
on the side(s) indicated by a Spot that is <a href="../symbols/Spot.html#isSide" class="linkMethod">Spot.isSide</a>.
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<!-- ============================== constructor details ==================== -->
</div> <!-- end contentBody -->
</div> <!-- end container-fluid -->
<!-- ============================== footer ================================= -->
<div id="footer" class="fineprint" style="clear:both">
Copyright &copy; 1998-2017 by <a href="https://www.nwoods.com/">Northwoods Software Corporation.</a>
</div>
</body>
</html>