The common interface for items in an IGraph that may own ports.
Inheritance Hierarchy
IPortOwner
Implemented Interfaces
Remarks
Typically this interface is actively implemented by INode's in an IGraph. To get to the edge instances that connect to the ports, the edgesAt method can be used. Alternatively for each IPort in ports, one can use the edgesAt method provided by IGraph. Like all items in an
IGraph
, this item supports the lookup method that can be used to query additional aspects of the item.Examples
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.IPortOwner
See Also
Properties
Gets a collection of ports that are owned by this instance.
Remarks
This gives access to a read-only live view of the ports, i.e. the collection can change over time, as well as the ports contained in it. If a snapshot of the current state is needed, one needs to copy the collection.
To modify the port collection for instances of the default implementations that were created via the factory methods on IGraph, use addPort and remove.
Examples
See Also
Gets or sets the tag associated with this instance.
Remarks
The tag is an optional user-defined object which can be used to store arbitrary data related to this item. The item itself does not normally depend on the tag associated with it. It serves as storage for the object only.
Examples
See Also
Nodes,
Edges,
Labels,
Ports,
Associating Data with Graph Elements,
Using Data Binding,
Adding Custom Data for Serialization,
Examples for Lookup Decoration
Implements
Methods
Returns an instance that implements the given type or null
.
Remarks
Typically, this method will be called in order to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile time constraints. An instance implementing this method is not required to return non-
null
implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.Type Parameters
- T: any
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
Note that the
$class
property on JavaScript classes inheriting from yFiles classes is only valid once an instance of this subclass was created. Call fixType, first or instantiate the class at least once.