C

SimpleNode

A mutable implementation of the INode interface that can be used without an IGraph.

Remarks

Note that this class is not the one used as the default implementation of a Graph's INodes and casting them to SimpleNode will fail.

Instances of this class can be used without an accompanying graph instance. All the properties are mutable. An example of a possible use case would be the rendering of a node into a graphics context: Simply create a SimpleNode, associate a style with it and use the style's renderer instance to obtain a rendering for the node.

Members

No filters for this type

Constructors

Creates a default node with default lookup, VOID_NODE_STYLE as style, an empty layout, and no labels nor ports.
The instances assigned to layout, ports and labels are immutable by default. To modify the values of those properties, first assign an instance of a mutable class.

Parameters

Properties

Gets or sets the collection of labels that are owned by this instance.
conversionfinal
Gets or sets the layout of the node.
The layout of a node is a rectangle in the world coordinate system that describes the bounds of the representation of a node.
conversionfinal

Implements

INode.layout
Gets or sets the collection of ports that are owned by this instance.
conversionfinal
Gets or sets the style that is responsible for the visual representation of this node in a CanvasComponent.
Note that the style instance associated with a node instance may be shared between multiple node instances and that the modification of this style will result in a change of the appearance of all nodes that are associated with the same style instance.
final

Implements

INode.style
Gets or sets the tag object associated with this item instance.
The tag is an optional user-defined object which can be used to store arbitrary data related to this item. The item itself just provides the storage for the object.
final

Implements

ITagOwner.tag

Methods

Gets a NodeDecorator to modify the ports ILookup.
final

Return Value

NodeDecorator
A NodeDecorator for this instance.
Returns an instance that implements the given type or null.
Typically, this method will be called 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 re-obtained for further use.
final

Parameters

type: Constructor<T>
the type for which an instance shall be returned

Return Value

T
an instance that is assignable to the type or null

Implements

ILookup.lookup