Package | com.yworks.graph.model |
Interface | public interface IMutablePortCollection extends IPortCollection, Iterable |
Implementors | ListPortModel |
IPortCollection
.
Implementations of this interface allow to modify
the collection through the factory methods addRelative(Number,Number,int)
and to remove existing ports.
Method | Defined 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 | ||
Returns the port at position index in the collection. | IPortCollection | ||
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 |
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.
|
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.
|