| Package | com.yworks.graph.model |
| Interface | public interface IPort extends IModelItem, ILookup |
| Implementors | DefaultPort |
IGraph implementation
for IEdges to connect to.
This interface provides read-only access to the properties of a port.
In order to modify the state of an instance use the various methods provided by the
IGraph this instance belongs to.
Ports are owned by IPortOwners, normally
an INode, but this can also be an IEdge in
special graph implementations.
To obtain the IEdge instances that are connected to a certain
port instance, applications need to use the IGraph.edgesAtPort(IPort)
method provided by IGraph.
Zero or more edges may be connected to a port, depending on the implementation of the graph.
Like all items in an IGraph, this item supports the
lookup method that can be used
to query additional aspects of the item.
| Property | Defined By | ||
|---|---|---|---|
| location : IPoint [read-only]
Returns a live view of the location of the port in world coordinates. | IPort | ||
| locationModelParameter : IPortLocationModelParameter [read-only]
Gets the port model's parameter that determines the location of this port. | IPort | ||
| owner : IPortOwner [read-only]
Returns the owner of this port. | IPort | ||
| style : IPortStyle [read-only]
Returns the style that is responsible for the visual representation
of this port in a CanvasComponent. | IPort | ||
| location | property |
location:IPoint [read-only] Returns a live view of the location of the port in world coordinates.
The location is the anchor for the edges, that connect to this port,
however it is up to the visualization
logic where exactly the visual part of an edge will end.
As this will yield a live view, it is up to the client to copy the values if
a snapshot of the state is needed.
In order to modify the location of a port, use the various methods
in IGraph.
public function get location():IPoint| locationModelParameter | property |
locationModelParameter:IPortLocationModelParameter [read-only] Gets the port model's parameter that determines the location of this port.
In order to set a different parameter for this port, use IGraph's setPortLocationModelParameter
method.
public function get locationModelParameter():IPortLocationModelParameter| owner | property |
owner:IPortOwner [read-only] Returns the owner of this port.
In traditional IGraph implementations, this will be
an INode and can safely be cast to one.
To obtain the IEdge instances that are connected to this
port instance, use the IGraph.edgesAtPort(IPort)
method provided by IGraph.
public function get owner():IPortOwner| style | property |
style:IPortStyle [read-only]
Returns the style that is responsible for the visual representation
of this port in a CanvasComponent.
In order to set the style on an instance, use the IGraph.setStyle( IPort, IPortStyle )
method.
Note that the style instance associated with a port instance may be shared between multiple port instances and that the modification of this style will result in a change of the appearance of all ports that are associated with the same style instance.
public function get style():IPortStyle