Packagecom.yworks.graph.model
Interfacepublic interface INode extends IPortOwner, ILabeledItem, IModelItem, ILookup
Implementors DefaultNode

The interface for node entities in an IGraph.

This interface provides read-only access to the properties of a node. In order to modify the state of an instance use the various methods provided by the IGraph this instance belongs to.

Nodes and edges are the main entities that make up an IGraph. Nodes have zero or more ports to which zero or more edges can connect.

IGraph provides the edgesAtPortOwner method for querying the edges that connect to nodes. Also it is possible to query the edgesAtPort for each port that is owned by nodes.

This interface combines the functionality of IPortOwner to get access to the ports, ILabeledItem to get access to the labels, and, like all items in an IGraph, nodes support the lookup method inherited from the IModelItem interface can be used to query additional aspects of each instance.



Public Properties
 PropertyDefined By
 Inheritedlabels : ILabelCollection
[read-only] Provides access to a collection of ILabels that are owned by this instance.
ILabeledItem
  layout : IRectangle
[read-only] Returns a live view of the layout of the node.
INode
 Inheritedports : IPortCollection
[read-only] Provides access to a collection of IPort that are owned by this instance.
IPortOwner
  style : INodeStyle
[read-only] Returns the style that is responsible for the visual representation of this node in a CanvasComponent.
INode
Public Methods
 MethodDefined By
 Inherited
lookup(type:Class):Object
Returns an instance that implements the given type or null.
ILookup
Property Detail
layoutproperty
layout:IRectangle  [read-only]

Returns a live view of the layout of the node.

The layout of a node is a rectangle in the world coordinate system that describes the bounding box of the representation of a node. Since this method will yield a live view, it is up to the client to copy the values of the instance if a snapshot of the state is needed. In order to modify the layout of a node, use the various methods in IGraph.


Implementation
    public function get layout():IRectangle
styleproperty 
style:INodeStyle  [read-only]

Returns the style that is responsible for the visual representation of this node in a CanvasComponent.

In order to set the style on an instance, use the IGraph.setStyle( INode, INodeStyle ) method.

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.


Implementation
    public function get style():INodeStyle