Packagecom.yworks.graph.model
Interfacepublic interface IMutablePortCollection extends IPortCollection, Iterable
Implementors ListPortModel

Mutable interface extension of IPortCollection.

Implementations of this interface allow to modify the collection through the factory methods addRelative(Number,Number,int) and to remove existing ports.



Public Properties
 PropertyDefined By
 Inheritedcount : uint
[read-only] Returns the number of elements in this collection.
IPortCollection
Public Methods
 MethodDefined By
  
addRelative(x:Number, y:Number, pos:int = -1):IPort
Create and add a new port with relative location x and y at the specific list index pos
IMutablePortCollection
 Inherited
getPort(index:uint):IPort
Returns the port at position index in the collection.
IPortCollection
 Inherited
Returns an iterator over a set of elements.
Iterable
  
removePort(port:IPort):void
Remove the specified port from the collection.
IMutablePortCollection
  
removePortAt(index:uint):void
Remove the port with the specified list index from the collection.
IMutablePortCollection
Method Detail
addRelative()method
public function addRelative(x:Number, y:Number, pos:int = -1):IPort

Create and add a new port with relative location x and y at the specific list index pos

Parameters

x:Number — The relative x coordinate of the new port
 
y:Number — The relative y coordinate of the new port
 
pos:int (default = -1) — The list index for the new port. If -1, the new port will be appended.

Returns
IPort — A newly created port at the given relative location
removePort()method 
public function removePort(port:IPort):void

Remove the specified port from the collection.

Parameters

port:IPort — The port to be removed.

removePortAt()method 
public function removePortAt(index:uint):void

Remove the port with the specified list index from the collection.

Parameters

index:uint — The list index to be cleared.