| Package | com.yworks.graph.model |
| Class | public class ListPortModel |
| Inheritance | ListPortModel Object |
| Implements | IMutablePortCollection |
IMutablePortCollection
that is backed by a list.
| Property | Defined By | ||
|---|---|---|---|
| count : uint [read-only] | ListPortModel | ||
| Property | Defined By | ||
|---|---|---|---|
| _nodeModel : INode | ListPortModel | ||
| Method | Defined By | ||
|---|---|---|---|
Constructor. | ListPortModel | ||
Adds a port to the list at the given index. | ListPortModel | ||
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
| ListPortModel | ||
Gets the port at the given index. | ListPortModel | ||
Returns an Iterator over the ports in the list. | ListPortModel | ||
removePort(port:IPort):void
Remove the specified port from the collection. | ListPortModel | ||
removePortAt(index:uint):void
Remove the port with the specified list index from the collection. | ListPortModel | ||
| Method | Defined By | ||
|---|---|---|---|
createCenterAnchoredPort(x:Number, y:Number):DefaultPort
Creates a new port which will be at the given offset relative to the node's center. | ListPortModel | ||
| _nodeModel | property |
protected var _nodeModel:INode| count | property |
count:uint [read-only] public function get count():uint| ListPortModel | () | Constructor |
public function ListPortModel(nodeModel:INode, ports:List = null)Constructor.
ParametersnodeModel:INode — A node as model (used for port creation).
| |
ports:List (default = null) — The List implementation to use. If none is provided, a new ArrayList will be used.
|
| add | () | method |
public function add(port:IPort, pos:int = -1):voidAdds a port to the list at the given index.
Parameters
port:IPort — The port to add.
| |
pos:int (default = -1) — The index to add the port at. If -1, the port will be appended to the list.
|
| 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
|
| createCenterAnchoredPort | () | method |
protected function createCenterAnchoredPort(x:Number, y:Number):DefaultPortCreates a new port which will be at the given offset relative to the node's center.
Parameters
x:Number — The x offset.
| |
y:Number — The y offset.
|
DefaultPort — The newly created port.
|
| getPort | () | method |
public function getPort(index:uint):IPortGets the port at the given index.
Parameters
index:uint — The index
|
IPort — The port at the given index.
|
| iterator | () | method |
public function iterator():Iterator
Returns an Iterator over the ports in the list.
Iterator — An Iterator over the ports in the list.
|
| removePort | () | method |
public function removePort(port:IPort):voidRemove the specified port from the collection.
Parameters
port:IPort — The port to be removed.
|
| removePortAt | () | method |
public function removePortAt(index:uint):voidRemove the port with the specified list index from the collection.
Parameters
index:uint — The list index to be cleared.
|